How do you copy and paste into Git Bash

Viewed 413080

I'm using msysgit running on Windows XP.

Tried Ctrl+V, Right click, Middle click, google... no luck.

35 Answers

Press Insert.

Also, to copy from the window, try clicking the console's window icon (topleft) and choosing Edit -> Mark, then drag a box on the text, then press Enter. (You can also paste via the window icon menu, but the key is faster.)

UPDATE

Starting from Windows 10 the CTRL + C, CTRL + V and a lot of other feature are implemented in conhost.exe so they should work with every console utility on Windows. (You have to enable Properties -> Option tab -> Quick Edit Mode)

Ref: http://blogs.windows.com/buildingapps/2014/10/07/console-improvements-in-the-windows-10-technical-preview/

Aside from using the edit menu commands, you can directly paste into the git bash window using the keyboard shortcut, Insert.

It's not really a function of git, msys, or bash; every windows console program is stuck using the same cumbersome copy/paste mechanism for historical reasons. Turning on QuickEdit mode can help -- or you can install a nice alternative console like this one, and change your git bash shortcut to use it instead.

I'm back to Windows for the first time in a long time and this got me cursing like a docker. I finally found this:

ctrl_shift_letter_shortcuts

Enabling Ctrl+Shift+letter shortcuts got me to a Linux-like behaviour that has lowered my blood pressure. Ctrl+Shift+C/Vnow works.

enter image description here

In windows after this setting you can use ctrl + shift + v ( for windows)

if your intention is copy/paste comments for git commits, try set the enviromental variable EDITOR as your favorite plain-text editor (notepad, notepad++ ...) and when you will commit, don't give him the -m option and Git will open your favorite editor for copy/paste you comment

To copy select the text and click CTRL+INS

To paste place the cursor where you want to print

and click SHIFT+INS

For more options, on the top left click on git-bash icon

enter image description here

  1. Right-click on the git bash.
  2. Select Options
  3. Click on the Mouse option on the left side bar.
  4. Select this highlighted option, it will be used as a paste.
  5. Don't worry, you can get the options when you do right-click on the top bar of the terminal.

I use the mouse:

  1. mark
  2. right click -> copy
  3. right click -> paste

I take it you're not on a Mac. Use insert key.

I also go through the same problem, git bash does not support tradition method to copy and paste in windows but you can simply copy and paste in single command

SHIFT+fn+INSERT

If you click at the icon on the upper left corner, a drop-down menu will appear, and you can find the option to copy/paste from there.

on my keyboard insert is located on the same key as a Printscreen. unfortunately, ctrl + ins doesn't work for me , so i descoved the following working combinations for me:

FN + CTRL + PRT SC - for copy

FN + SHIFT + PRT SC - for insert

If you want to paste press:

shift + insert

The solution that worked is for:

  • desktop keyboard: [shift] + [insert] keys to paste

  • laptop keyboard: [shift] + [0] keys to paste

NB: For laptops, the 0 Key at the bottom of the number pad on the upper-right corner of your keyboard will function as an Insert Key when Num Lock is turned off. That is why it is labeled with both 0 and Ins on the key itself.

Just copy the link. Then press SHIFT + INSERT.

Related