git branch -a
List all avaiable branches
Fetch all remote repository data into local one, including new branches
git fetch -p
Fetch all remote repository data into local one, including new branches. -p (prune) causes unexisting remote branches to be dropped also locally
git checkout -b newbranch
create a new branch named "newbranch" starting from current commit
git merge otherbranch
Merge local branch named "otherbranch" to be merged into current local branch
git push origin newbranch
Push all commit in local branch newbranch to remote origin, creating remote branch if not already present
git branch -D oldbranch
Delete local branch named "oldbranch". Any tag pushed from deleted branch will be preserved.
git push origin --delete oldbranch
Delete remote branch named "oldbranch". Any tag pushed from deleted branch will be preserved.
git merge --squash featurebranch
Merge branch named "featurebranch" into current one, squasshing all commit into a single one. Commit with comment is needed to complete operation.