GitHub

Basics

Check out a remote Git branch

# List all remote branches
$ git branch -r
# Checkout a remote branch as a local branch
$ git checkout -b local_branch_name origin/remote_branch_name

Merge the changes from the master to a branch

$ git pull origin master

Check out/switch a local Git branch

# Create a new branch
$ git checkout -b myNewBranchName
# Switch to an existing branch
$ git checkout myBranchName

Remove a local branch

$ git branch -D myLocalBranchName

Add a tag

$ git tag -a v2.0.0 -m "release v2.0.0"
$ git push origin v2.0.0