-
-
Save tgvashworth/488a5dfa6cdd7d48b1c6 to your computer and use it in GitHub Desktop.
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
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
ui = true | |
[help] | |
autocorrect = 1 | |
[mergetool] | |
keepBackup = true | |
[rerere] | |
enabled = true | |
[push] | |
default = simple | |
[branch] | |
autosetuprebase = always | |
[alias] | |
cl = clone | |
co = commit | |
com = commit -m | |
# add and commit with message | |
coam = commit -am | |
# amend a previous commit | |
amend = commit --amend | |
append = commit --amend --no-edit | |
# nick a patch and make it your own | |
steal = !git amend --reset-author --no-edit | |
ch = checkout | |
st = status | |
br = branch | |
# add in patch-mode (interactive) | |
ap = add -p | |
# undo the last commit | |
undo = reset --soft HEAD~1 | |
# new branch | |
nbr = checkout -b | |
# try out a merge | |
drymerge = merge --no-commit --no-ff | |
# wipe away chnges to tracked files | |
clear = reset --hard | |
# sync up | |
sync = !git pull && git push | |
# what files changed? | |
changed-files = diff-tree --no-commit-id --name-only -r | |
# what's staged for commit? | |
staged = diff --cached | |
me = !git log --author=\"$(git config user.name)\" --no-merges | |
# some tasty logging graphs | |
# I tend to use lg and lg4 | |
lg1 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative | |
lg2 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(bold white)— %an%C(reset)' --abbrev-commit | |
lg3 = !git log --graph --oneline --all --decorate `git reflog | cut -c1-7` | |
lg4 = !git log --graph --oneline --decorate | |
lg = !git lg1 | |
# diff of what happend in the last day | |
todiff = !git diff $(git rev-list -n1 --before=\"1 day ago\" ${1:-master}) | |
# summary of changes today | |
today = !git diff $(git rev-list -n1 --before=\"1 day ago\" ${1:-master}) --shortstat | |
# try out a merge | |
drymerge = merge --no-commit --no-ff | |
# Stage me (requires you have my easy-staging script) | |
stageme = !gitstage | |
g = grep --break --heading --line-number | |
# TweetDeck | |
headless = !git fetch && git ch origin/master | |
gerrit = push publish | |
yolo = push review --no-verify |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment