forestgeo / learn

Links to interesting articles, videos, tutorials, tips, and more
5 stars 8 forks source link

How to copy and paste from git bash #41

Open maurolepore opened 6 years ago

maurolepore commented 6 years ago

If running from a git-bash terminal

If running from cmd.exe (start > run > cmd.exe)

First enable QuickEdit mode (Access the menu with Alt + Space bar) Then,

https://stackoverflow.com/questions/38626959/how-do-you-copy-from-gitbash-git-bash

amrrox commented 5 years ago

THANK YOU SO MUCH

spencerrichardhenry commented 5 years ago

Is there anyway to edit the shortcut so it can be ctrl+c and ctrl+v

maurolepore commented 5 years ago

@spencerrichardhenry, maybe you'll find some answers here: https://community.rstudio.com/tags/git

antoinelmtre commented 4 years ago

On Git Bash terminal

You can also go in Option > Keys and select "Ctrl+Shift+letter shortcut". Then you will be able to use Ctrl+Shift+c and Ctrl+Shift+v which is a bit more natural than Ctrl+Insert and Shift+Insert

nitink66 commented 4 years ago

not working on windows. Its says bash: colrm: command not found Untitled

AnnanFay commented 4 years ago

How do you select text in order to copy it?

If you use the mouse to select it then it's pretty quick to copy using the right click context menu. The only time you normally want to use a keyboard shortcut to copy text is if you aren't using the mouse to select text so you don't need to remove your hands from the keyboard.

Johnrobmiller commented 3 years ago

This is just my opinion, but since Windows users use ctrl+c and ctrl+v to copy/paste, the Git Bash should have shipped with that as the default key binding for Windows users. Furthermore, they optionally let people use ctrl+shift+c/v but not ctrl+c/v, which is very questionable. I don't mean any offense to the original developers or anything, but I'm not sure why people put up with this.

triciasdmngo commented 3 years ago

This is just my opinion, but since Windows users use ctrl+c and ctrl+v to copy/paste, the Git Bash should have shipped with that as the default key binding for Windows users. Furthermore, they optionally let people use ctrl+shift+c/v but not ctrl+c/v, which is very questionable. I don't mean any offense to the original developers or anything, but I'm not sure why people put up with this.

I think (but I am not sure as well) the reason might be is because the Ctrl+C command is being used in a different way in the terminal? I was watching CS50 Harvard lesson in Git and Github and the instructor is discussing something about SASS. The thing about scss files is that it should be converted into css files before they can be read by the browser right? but to do the converting, you should key in sass <file name>.scss <file name>.css so it would take effect. But it would be tiresome to always to do this when you want to implement changes in the css file so he taught a command where the computer will continuously watch the following files and automatically update it. I don't remember the command but it starts with a --watch, and when he demoed it I saw the message on the terminal say 'click Ctrl+C if you want the action to stop' (not exact words but pretty much what it says). Not sure about this though because I am still conflicted on the differences of using Git Bash and my default command line, and I am sure that the instructor is rather using his default terminal on Mac and not Git Bash.

cendern commented 3 years ago

@Asparagus-inator you're correct about ctrl+c and ctrl+v being used in Bash already. ctrl+c kills a program that's running in the foreground and ctrl+v is a special command that lets you type literal characters like tab or newline.

With Git Bash's Copy on select behavior as the default, there's no reason to use a keyboard shortcut to explicitly copy. You'll also find that shift+insert does the same thing as ctrl+v in Windows. That's because, like many other features, Microsoft originally stole that behavior from Unix/Linux.

LukeAvea commented 3 years ago

In both of these cases I chose Windows Console as the terminal during GIT installation. My home Windows machine is running GIT 2.23 and pasting with control-V works. On my work laptop I was running GIT 2.33 and pasting with control-V did not work, instead inserting control characters. Anyone know the latest version of GIT for Windows that supports control-V paste? I downgraded my work version so I could restore this capability but don't love running an outdated version. Alternatively, is there some GIT setting I can change to restore control-V pasting even in new versions? Forgive me if this was already mentioned in the thread and i missed it. Thanks.

alinz07 commented 2 years ago

I have quickedit mode and ctrl key shortcuts enabled in the properties, options tab. Ctrl v still doesn't work. I'm sure it's because of a setting I chose during setup, but I found that if I ctrl c anything, I can just right click and it will paste. Not what I'm used to, I wish I had ctrl v, available, but I don't care to fiddle with versions or console settings.

Mr-FarzandAli commented 2 years ago

when i shift + insrt or right click paste a URl after git clone it gets pasted like GUBGMHVpwcTsPFvNNVdG5DKtpv6UwksAfzw5aULcGzgG not the url itself git img