Skip to content

Instantly share code, notes, and snippets.

@jeffjrare
Last active May 18, 2017 15:31
Show Gist options
  • Save jeffjrare/7344337 to your computer and use it in GitHub Desktop.
Save jeffjrare/7344337 to your computer and use it in GitHub Desktop.
Excerpt of my day-to-day job ~/.gitconfig
[color]
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow
frag = magenta
old = red
new = green
[color "status"]
added = green
changed = yellow
untracked = cyan
[apply]
whitespace = nowarn
[alias]
drop = branch -D
lasttag = git describe --tags `git rev-list --tags --max-count=1`
adda = add --all
st = status
cam = commit -a -m
ci = commit
cia = commit --amend
co = checkout
cob = checkout -b
br = branch
sb = show-branch
cp = cherry-pick
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short#"
unstage = reset HEAD --
u = reset HEAD --
m = merge --no-ff
po = pull origin
por = pull --rebase origin
pusho = push origin
pullo = pull origin
pullro = pull --rebase origin
pr= pull --rebase
s = show --pretty=format: --name-only
sl= stash list
staged = diff --cached
rb = rebase
rba= rebase --abort
rbc = rebase --continue
rbs = rebase --skip
rh = reset HEAD
rl = reflog
rs = remote show
rt = remote
ru = remote update
rp = remote prune
sm = submodule
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
copm = checkout project-mondossier
corpm = checkout release-project-mondossier
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
undo = reset --hard HEAD^
getfile = git ls-tree -r HEAD | grep
ignoreupd = ls-files --ignored --exclude-standard | xargs git rm --cached
up = "!git remote update -p; git merge --ff-only @{u}"
rebaseclean = rebase --preserve-merges
[log]
decorate = full
@jeffjrare
Copy link
Author

How to use?

Just open with a text editor the file ~/.gitconfig , and append/replace what you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment