Last active
February 12, 2017 04:42
-
-
Save sally/0cfec7f68a15fc6474915680ac53c350 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
[core] | |
# Excludesfiles allows us to set a global list of things to ignore | |
excludesfile = ~/.gitignore_global | |
# These are custom color options for the console | |
[color] | |
status = auto | |
diff = auto | |
[color "status"] | |
untracked = cyan | |
changed = green | |
added = yellow | |
# Aliases are command shortcuts | |
[alias] | |
# lg is now a shortcut for a pretty log with short commit messages | |
# See the log manpage: https://www.kernel.org/pub/software/scm/git/docs/git-log.html | |
# for explanations of what these options do | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
# Shorthand for a less noisy status | |
s = commit --dry-run --short | |
# More sensible names for adding and removing files from the readme | |
stage = add | |
unstage = reset HEAD | |
# Edit the last commit | |
amend= commit --verbose --amend | |
# one-line log | |
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short | |
a = add | |
ap = add -p | |
c = commit --verbose | |
ca = commit -a --verbose | |
cm = commit -m | |
cam = commit -a -m | |
m = commit --amend --verbose | |
d = diff | |
ds = diff --stat | |
dc = diff --cached | |
co = checkout | |
cob = checkout -b | |
# list branches sorted by last modified | |
b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'" | |
# list aliases | |
la = "!git config -l | grep alias" | |
[credential] | |
helper = cache --timeout=14400 | |
[user] | |
email = [email protected] | |
name = Sally Park |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment