Reputation: 180
So I know how to copy and paste using Git Bash's shortcut commands, but I can't figure out how to disable the auto-enter feature when I'm trying to copy paste more than one thing. I am just now learning how to use Git and I want to use the following:
git log
and then
git diff {copy paste from git log commit 1} {commit 2}
but it auto-enters as soon as I paste the first commit (which is like 80 characters long, so typing out is too painful). Using the git --version
command, I get: 2.17.0.windows.1
.
EDIT: Since a comment mentioned not highlighting the newline character, I watched as the terminal auto-highlighted all the way to right as I highlighted from right-to-left. Apparently, one must highlight from left-to-right. It fixed the problem, so thank you!
Upvotes: 1
Views: 1670
Reputation: 180
Since a comment mentioned not highlighting the newline character, I watched as the terminal auto-highlighted all the way to right as I highlighted from right-to-left. Apparently, one must highlight from left-to-right. It fixed the problem, so thank you!
By auto-highlight I meant that I started highlighting, using my mouse, from the end of the text (right-most text) going to the left. As soon as I started dragging, the highlighted area extended itself automatically to the end of the entire console line (all the way to the right of the console window). This must have picked up the newline character, so when I pasted, it also ran the command.
Upvotes: 2
Reputation: 83537
When you highlight something to copy, be sure you don't select the EOL character. This means you should not triple click. One solution is to select everything but the last character on the line that you want to copy. Then you will have to manually type the final character.
Note that if you are copying a SHA-1 hash for a commit, you can use enough of the leading digits to uniquely identify the commit. You do not need the full hash. Typically 5 or 6 leading digits is enough.
Upvotes: 3