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:55

Get Console2. You configure it to do it multiple different ways. Works with bash or Windows command prompts.

查看更多
时光不老,我们不散
3楼-- · 2020-05-10 15:55

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

查看更多
乱世女痞
4楼-- · 2020-05-10 15:55

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

查看更多
小情绪 Triste *
5楼-- · 2020-05-10 15:56

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

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

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/

查看更多
放荡不羁爱自由
7楼-- · 2020-05-10 15:58

I use the mouse:

  1. mark
  2. right click -> copy
  3. right click -> paste
查看更多
登录 后发表回答