How do you copy and paste into Git Bash

前端 未结 30 1111
抹茶落季
抹茶落季 2021-01-29 16:47

I\'m using msysgit running on Windows XP.

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

相关标签:
30条回答
  • 2021-01-29 17:51

    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

    0 讨论(0)
  • 2021-01-29 17:52

    Use Shift + Insert like in linux bash

    Edit: It works even in putty.

    0 讨论(0)
  • 2021-01-29 17:52

    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:

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

    0 讨论(0)
  • 2021-01-29 17:53

    This is suggested by the github help page:

    clip < filename
    

    this copies the contents of filename to the clipboard and is useful for doing things like copying your id_rsa.pub to a web form.

    0 讨论(0)
  • 2021-01-29 17:54

    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/

    0 讨论(0)
  • 2021-01-29 17:54

    Ctrl + insert did it for me in Windows.

    0 讨论(0)
提交回复
热议问题