Skip to content

Instantly share code, notes, and snippets.

@eduardolundgren
Created February 7, 2013 19:18
Show Gist options
  • Save eduardolundgren/4733394 to your computer and use it in GitHub Desktop.
Save eduardolundgren/4733394 to your computer and use it in GitHub Desktop.
[alias]
co = checkout
ci = commit
cp = cherry-pick
rb = rebase
st = status
br = branch
df = diff
who = shortlog -s --
sync-origin = "!sh -c 'git pull --rebase upstream master && git push origin master'"
lg = "log --graph --pretty=format:'%Cred%h%Creset %C(bold blue)[Commiter: %cn]%Creset %C(bold green)[Author: %an]%Creset -%C(yellow)%d%Creset %s %C(bold blue)[%cD]%Creset %C(bold green)[%aD]%Creset' --abbrev-commit --date=relative --max-count=10"
lga = "log --graph --pretty=format:'%Cred%h%Creset %C(bold blue)[Commiter: %cn]%Creset %C(bold green)[Author: %an]%Creset -%C(yellow)%d%Creset %s %C(bold blue)[%cD]%Creset %C(bold green)[%aD]%Creset' --abbrev-commit --date=relative"
so = "!git sync-origin"
# open batch of files
open = "!f() { editor=`git config --get user.editor`;files=`git show --pretty="format:" --name-only $1`;useopen=`command -v open`; usecygwin=`command -v cygstart`; [[ -n "$useopen" ]] && open -a $editor $files && exit $?; [[ -n "$usecygwin" ]] && editor=$(cygpath -d "$editor"); $usecygwin $editor -n; for i in $files; do echo "Opening $i"; $usecygwin $editor $i; done }; f"
switch = !legit switch \"$@\"
branches = !legit branches
sprout = !legit sprout \"$@\"
unpublish = !legit unpublish \"$@\"
harvest = !legit harvest \"$@\"
sync = !legit sync \"$@\"
publish = !legit publish \"$@\"
graft = !legit graft \"$@\"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment