Created
June 11, 2012 14:24
-
-
Save mkolb/2910308 to your computer and use it in GitHub Desktop.
git stuff I can't remember
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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