# create new branchgitcheckout-b{branch_name}# delete branch locallygitbranch-d{BranchNameDelete}# delete branch locally, that not mergedgitbranch-D{BranchName}# delete branch remotelygitpushorigin--delete{BranchName}# Prune branchesgitremotepruneorigin
gitbranch-r|awk'{print $1}'|egrep-v-f/dev/fd/0<(gitbranch-vv|greporigin)|awk'{print $1}'|xargsgitbranch-D
Checkout to remote branch
git checkout -b {branch} origin/{branch}
Tag
# show tags on HEADgittag--points-atHEAD
# addgittag{tagname}# push to origingitpushorigin--tags
# deletegittag-d{tagname}# push deletegitpushorigin--delete{tagname}
Rollback to commit
git reset --hard {commit}
git push -f
git log
git log -5 --pretty=format:"%h %ad | %s%d [%an]"
gitignore
# ignore directory content, but not directory
dir/*
!dir/.gitkeep