Git Command Cheat Sheet
1 2 3 4 5
git init git diff git status git add git add <file>
Create new local Show changes not List new or Stage all changed
Stage a file.
repo. yet staged. unmodified files. files.
@iamgnanadeep
Git Command Cheat Sheet
6 7 8 9 10
git commit -- git checkout
git commit -a git commit git log
amend <branch>
Commit all local
Commit previously Change the last Show full change Switch a branch and
changes in tracked
staged changes. commit. history. update directory.
files.
@iamgnanadeep
Git Command Cheat Sheet
11 12 13 14 15
git pull git push
git checkout git checkout git fetch
<remote> <remote>
<new-branch> -d <branch> <remote>
<branch> <branch>
Fetch remote version Push the committed
Fetch all branches
Create new branch. Delete a branch. and update local changes to remote
from remote repo.
branch. repoistory.
@iamgnanadeep
Git Command Cheat Sheet
16 17 18
git merge git rebase git revert
<branch> <branch> <remote>
Merge the specified Rebase your current Creates a new
branch into the HEAD onto the commit to revert the
current branch. specified branch. specified commit .
@iamgnanadeep
FOLLOW
FOR MORE
@iamgnanadeep