Adding a remote git remote add upstream https://github.com/otheruser/repo.git List of remotes git remote -v git cherry-pick a merge commit git cherry-pick -m 1 <SHA5> git 1.7 squash commits git merge --squash feature/old_branch Delete branches already merged gco master && git branch --merged | grep -v "\*" | xargs -n 1 git branch -d Delete Remote tag git push origin :refs/tags/tag_name List branches and show info on last commit function heads(){ for k in `git branch | perl -pe s/^..//`; do echo -e `git log --color --pretty=format:"%C(auto)%ad%C(bold green)$k%Creset|%s (%Cgreen%cr%Creset by %C(bold blue)%an%Creset)" --date=short $k | head -n 1`; done | sort -r | perl -pe s/^[0-9\-]*// | column -t -s '|’ } List only file names that changed git diff --name-only SHA1 SHA2