1and1 Help Centre Categories

print article

Overview of the Essential Git Commands

For Linux packages with SSH access

Below is a compilation of the main Git commands that will assist you when working with the control system.

On the command line, simply enter git followed by the desired command.

Command Description
add Add files
branch List, create, or delete branches
checkout Check out whole branches or file paths
clone Clone the repository in a new directory
commit Add changes to the repository
diff Show changes between two versions
fetch Download objects and references from other repositories
grep Search for specific patterns
init Position an empty repository or select an existing repository
log See commit log files
merge Two or merge multiple versions
mv Move or renmae the file, folder, or link
pull Download objects and references from repositories and merge with another repository
push Update references within related objects
reset Clear the current HEAD (Branch) to a specific status
rm Delete files
show Show object types
status View status
day Produce day, list, delete or verify
For additional information, you may want to reference: