你如何从gitbash复制(Git Bash)

How do you copy from gitbash(Git Bash)

我在 Windows 上使用 git-for-windows MING64 MinTTY 运行 7. 当我 select 在 [=26= 上发短信时] bash,总是触发ctrl+C(下一个命令行会显示^C。

例如:当我左键向下点击select“git --version”,然后左键向上点击,下一个命令行变成“$^C”。

$ git --version

git version 2.9.2.windows.1

$^C

有没有人遇到过这个问题?以及如何解决? 我从 https://github.com/git-for-windows/git/releases.

下载 exe 文件

输入键盘组合Alt+Space栏打开命令window的系统菜单。然后使用 select 并从那里复制选项。

有逐步扩展说明

另见 Copying and Pasting in Git Bash。摘录如下:

Copying and Pasting in Git Bash

The default way to copy/paste in Git Bash is by using the menu (accessed by going to the top left) to "mark" to select what you want to copy and then use the menu again to paste.

This gets inefficient pretty quickly, so it's a good idea to set up QuickEdit mode to make copying and pasting much faster. To do this, go to Menu->Properties and in the Options tab select QuickEdit Mode.

一些拦截您的信号的其他软件:检查您的进程并尽可能地尝试 close/kill 查看问题是否仍然存在。 在我的例子中是 YodaoDict.exe

  • 在 windows 10
  • Git-bash(git 版本 2.14.1.windows.1)

复制:CTRL + INSERT
粘贴:SHIFT + INSERT

来源here

您可以使用 autohotkeysShift + Insert 转换为您想要的另一个快照。我在我的自动热键文件中使用这种方式:

^+v::^Ins

对我来说更好 Ctrl+Shift+V 而不是 Ctrl+V 以避免与 vim 的兼容性问题,但如果您不使用 vim,则可以使用通用方式。

另一种解决方案是使用像 conemu 这样的控制台模拟器,它允许您编辑所有快照。

我使用鼠标

  1. 标记
  2. 右击 -> 复制
  3. 右键单击 -> 粘贴
  • 复制: Ctrl +(左键单击突出显示)
  • 粘贴:右键单击

在我的 Git Bash 中,我完成了 Left click down > Selected text > Left click up。 所选文本保持选中状态。 ^C 没有出现在控制台上。

^C 仅当我单击 Ctrl+C 时才会出现在控制台上。

您的设置与默认设置不同。 使用默认 settings.
薄荷版本:3.4.4 (x86_64-pc-mysys) [Windows 19042]