Copy and Paste in Git Bash
This tutorial explains copying and pasting in Git Bash using the keyboard.
Git Bash
Git is a set of command-line utility programs that run on Unix and Linux command-line environments. It is often used with a Graphical User Interface (GUI) in a Windows environment.
Git Bash provides a Git command line experience in a Windows environment. It installs both Bash and Git on Windows environments.
Copy in Git Bash
To copy the text in Git Bash using the keyboard, hold the Shift button and highlight the text or use the left/right arrows to select the text, then press Enter to copy.
In the image below, we use the ls
command to list the content of the current folder, delftstack
. To copy the name of file1.txt
, we hold the Shift button and use the left/right arrows keys to highlight the file’s name and press Enter.
Paste in Git Bash
To paste the text in Git Bash, press Insert.
In the image below, we type the cat
command, then space and press Insert to paste the name of the file we copied previously. The cat
command displays the file’s content that we passed to it as the argument.