Skip to content

Instantly share code, notes, and snippets.

@paxperscientiam
Created May 10, 2017 16:32
Show Gist options
  • Select an option

  • Save paxperscientiam/45807a88ecf8dea9a945f9ec73295142 to your computer and use it in GitHub Desktop.

Select an option

Save paxperscientiam/45807a88ecf8dea9a945f9ec73295142 to your computer and use it in GitHub Desktop.
Some git aliases I like
# Note, I call my fork 'origin' and the owner's fork 'upstream'.
# this syncs your current branch with that of upstream/master
rewind = reset --hard upstream/master
# make log output pleasing to the eye.
log = log --oneline --graph --pretty=format:'%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]' --decorate --all
# this destroys a branch locally and remotely. Must not be the active branch.
nuke = "!sh -c 'git branch -D $1 && git push origin :$1' -"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment