Skip to content

Git CheatSheet

Veerendra Kakumanu edited this page Aug 21, 2020 · 5 revisions

List Branchs

$ git fetch origin
$ git branch -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/master
  remotes/origin/release/1.0

Change Branch

$ git switch foo

Track Files

$ git add -A

Create a branch from another branch

$ git checkout -b <sub-branch> branch

Move head to a commit

$ git reset --hard 4b15534

Clone this wiki locally