Skip to content

Instantly share code, notes, and snippets.

@mkolb
Created June 11, 2012 14:24
Show Gist options
  • Save mkolb/2910308 to your computer and use it in GitHub Desktop.
Save mkolb/2910308 to your computer and use it in GitHub Desktop.
git stuff I can't remember
# clean up your own junk
git remote prune public
# create a branch based of off a commit
git branch branchname <sha1-of-commit>
# wack a remote branch
git push origin :the_remote_branch
# wack a remote tag
git push origin :refs/tags/tagname
# find the first commit on a branch
git config --global alias.oldest-ancestor '!zsh -c '\''diff -u <(git rev-list --first-parent "${1:-master}") <(git rev-list --first-parent "${2:-HEAD}") | sed -ne "s/^ //p" | head -1'\'' -'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment