Branches

Show branch details

$git branch -v -a

$git branch -a

$git branch -r

$git remote show origin

List revision

$git rev-list -n 2 HEAD -- <file_path>

Retrieve new branch

$git fetch origin

$git fetch origin --prune

Create Branch

$git checkout -b test origin/test

Set upstream

$git branch --set-upstream-to=origin/<BRANCH> <BRANCH>

Push to Origin

$git push -u origin <BRANCH>

Merge

$git merge --no-ff <BRANCH>

Reset