Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you copy and paste into Git Bash

I'm using msysgit running on Windows XP.

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

like image 773
Trav L Avatar asked Feb 21 '10 00:02

Trav L


People also ask

How do I paste into a bash script?

If you highlight text in the terminal window with your mouse and hit Ctrl+Shift+C you'll copy that text into a clipboard buffer. You can use Ctrl+Shift+V to paste the copied text into the same terminal window, or into another terminal window.

How do I enable copy and paste in terminal?

Similarly, you can use Ctrl+shift+C to copy text from the terminal and then use it to paste in a text editor or web browser using the regular Ctrl+V shortcut. Basically, when you are interacting with the Linux terminal, you use the Ctrl+Shift+C/V for copy-pasting.


2 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/

like image 187
Amber Avatar answered Oct 25 '22 03:10

Amber


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

like image 35
Dan Rigby Avatar answered Oct 25 '22 01:10

Dan Rigby