How to Copy and Paste in Git Bash

John Wachira Feb 02, 2024
  1. Copy and Paste With Keyboard Shortcuts in Git Bash
  2. Copy and Paste on Git’s Menu in Git Bash
  3. Use the Right and Left Mouse Keys to Copy and Paste in Git Bash
How to Copy and Paste in Git Bash

A majority of developers face challenges when using terminals. This article will discuss how you can copy and paste in Git Bash.

Copy and Paste With Keyboard Shortcuts in Git Bash

Originally, Git Bash does not allow you to use the common Ctrl+C and Ctrl+V keyboard shortcuts for copying and pasting. The Ctrl+C shortcut will interrupt any running command on your terminal.

You can configure your terminal to accept the shortcuts for copying and pasting. You need to enable Quick Edit Mode to proceed with this method.

  1. On your Git Bash, click on the terminals icon on the top-left corner.

    git bash

  2. Tap the Defaults option. A Console Windows Properties tab should pop out.

    Properties

  3. Check the Quick Edit Mode and Use Ctrl+Shift+C/V as Copy/Paste boxes and click OK.

Note
You do not have to use the Ctrl+Shift+C and Ctrl+Shift+V keyboard shortcut with the Shift option.

Copy and Paste on Git’s Menu in Git Bash

  1. On your Git Bash, click on the terminals icon on the top-left corner.

    git bash

  2. Hover on the Edit option and click Paste or Copy, depending on your desired action. If you are copying from the Bash, you should have copied the text before.

    paste bash

Use the Right and Left Mouse Keys to Copy and Paste in Git Bash

  1. When you have selected the text to copy, click the right mouse key.

    L or R mouse keys

  2. Click Copy or Paste depending on your desired action.

Those are the common methods to copy and paste in Git Bash.

Author: John Wachira
John Wachira avatar John Wachira avatar

John is a Git and PowerShell geek. He uses his expertise in the version control system to help businesses manage their source code. According to him, Shell scripting is the number one choice for automating the management of systems.

LinkedIn

Related Article - Git Bash