How do you copy and paste into Git Bash

2020-05-10 15:21发布

I'm using msysgit running on Windows XP.

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

30条回答
贼婆χ
2楼-- · 2020-05-10 15:41

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

查看更多
Explosion°爆炸
3楼-- · 2020-05-10 15:42

enter image description here

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

查看更多
爷的心禁止访问
4楼-- · 2020-05-10 15:43

Ctrl + insert did it for me in Windows.

查看更多
等我变得足够好
5楼-- · 2020-05-10 15:43

Yep, copy from somewhere else using ctrl+c and paste using INSERT. Work for me on Window 8.

查看更多
Fickle 薄情
6楼-- · 2020-05-10 15:44

The way I do this is to hold Alt then press Space, then E and finally P.

On Windows Alt jumps to the window menu, Space opens it, E selects Edit and P executes the Paste command.

Get these correct in succession and you can paste a snippet in under 2 seconds.

查看更多
看我几分像从前
7楼-- · 2020-05-10 15:44

Right click on the Git Bash shortcut and switch to the Options tab. Enable Quick Edit Mode and click OK.

Now you can use right click to paste into Git Bash, even passwords for remote push, which you can't do with Insert.

enter image description here

This also enables copy easily. Just left click and drag in the console window to select any block of text. Now right click on the selection and the text block will be copied in RAM. This is way more easier and intuitive than the other ways.

Image source: https://danlimerick.wordpress.com/2011/07/23/git-for-windows-tip-how-to-copy-and-paste-into-bash/

查看更多
登录 后发表回答