Git Commands#
Git Cheatsheet#
Start a working area#
Command |
Description |
---|---|
|
Clone a repository into a new directory |
|
Create an empty Git repository or reinitialize an existing one |
Work on the current change#
Command |
Description |
---|---|
|
Add file contents to the index |
|
Move or rename a file, a directory, or a symlink |
|
Reset current HEAD to the specified state |
|
Remove files from the working tree and from the index |
Examine the history and state#
Command |
Description |
---|---|
|
Show commit logs |
|
Show various types of objects |
|
Show the working tree status |
Grow, mark and tweak your common history#
Command |
Description |
---|---|
|
List, create, or delete branches |
|
Switch branches or restore working tree files |
|
Record changes to the repository |
|
Show changes between commits, commit and working tree, etc |
|
Join two or more development histories together |
|
Reapply commits on top of another base tip |
|
Create, list, delete or verify a tag object signed with GPG |
Collaborate#
Command |
Description |
---|---|
|
Download objects and refs from another repository |
|
Fetch from and integrate with another repository or a local branch |
|
Update remote refs along with associated objects |