Skip to content

Instantly share code, notes, and snippets.

@mattcanty
Last active September 23, 2016 11:23
Show Gist options
  • Save mattcanty/518e5926391ecf26f8a4 to your computer and use it in GitHub Desktop.
Save mattcanty/518e5926391ecf26f8a4 to your computer and use it in GitHub Desktop.
Git 'Standup' Alias
[alias]
aa = add .
s = status
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit -10
co = checkout
cob = checkout -b
ec = config --global -e
up = !git pull --rebase --prune $@ && git submodule update --init --recursive
save = !git add -A && git commit -m 'SAVEPOINT'
undo = reset HEAD~1 --mixed
amend = commit -a --amend
bclean = "!f() { git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs -r git branch -d; }; f"
bdone = "!f() { git checkout ${1-master} && git up && git bclean ${1-master}; }; f"
branches = !git fetch && git branch -a
remaster = pull --rebase origin master
su = !"git log --reverse --branches --since=$(if [[ "Mon" == "$(date +%a)" ]]; then echo "last friday"; else echo "yesterday"; fi) --author=$(git config --get user.email) --format=format:'%C(cyan) %ad %C(yellow)%h %Creset %s %Cgreen%d' --date=local"
standup = "!f() { for dir in ../*; do (cd "$dir" && git su); done; }; f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment