Common Commands

Following is a list of commands that are used frequently in our workflow. You should memorize what these commands are, what they do, and how and when to use them.

graph

git log

git status

git command --help

git commit
git commit -m 'commit message'

git add
git add .
git add path/to/filename.html

git checkout
git checkout branch-name
git checkout a1b2c3 # commit hash
git checkout -- .
git checkout -- path/to/filename.html

git push
git push -u origin branch-name
git push origin branch-name
git push origin -d branch-name

git fetch

git pull
git pull origin dev

git branch
git branch -av

git remote
git remote prune

git prune

git gc

Check the git tutorial if you are unfamiliar with any of these.