Git cheat sheet

git pull from other repo

git remote add upstream https://location/of/generic.git  
git pull upstream  

git delete branch both locally and remotely

git branch -d <branch-name>  
git push origin :<branch-name>  

search git commit by log

git log --grep="to api constant file"  

tags

git tag -a v0.2.0 -m "bump tag version since Audio Engine code has some latency changes"  
git push origin v0.2.0  
git tag -d v0.2.0  
git push origin :refs/tags/v0.2.0  

header count

git rev-list HEAD --count  

check git repo url

git remote -v

add upstream

git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git