Git Command

Frequently used git commands

Git Quick Start

version fallback

1
2
3
4
5
6
7
8
# you need to be in the branch you want to fall back
# input "q" to quit
# write down the commit number, let us assume it it aa11bb22cc33dd44
git log

# you can fallback to the specific commit you want
# please remember to save your original or it will be erased
git reset --hard aa11bb22cc33dd44

display branch

1
2
3
4
5
git branch

# output shown as following
# WI325-Simon-0413
# *develop (current branch with "*")

delete branch

1
git branch -d WI325-Simon-0413