Skip to content

Instantly share code, notes, and snippets.

@celosauro
Last active February 27, 2020 15:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save celosauro/77be83c21423166acadb8e64526866c5 to your computer and use it in GitHub Desktop.
Save celosauro/77be83c21423166acadb8e64526866c5 to your computer and use it in GitHub Desktop.
.gitconfig file
[user]
name =
email =
# username =
[core]
editor = nano
#whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[web]
browser = google-chrome
[push]
default = current
[color]
ui = auto
[color "branch"]
current = yellow bold
local = green bold
remote = cyan bold
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[color "status"]
added = green bold
changed = yellow bold
untracked = red bold
[format]
pretty = oneline
[alias]
co = checkout
cob = checkout -b
ours = checkout --ours --
theirs = checkout --theirs --
#
st = status -sb
#
branches = branch -a
delete-remote-branch = "!sh -c \"git push origin --delete $1\""
delete-branch = !git branch -D
nomerged = branch --no-merged
merged = branch --merged
#
lg = log --abbrev-commit
logtree = log --abbrev-commit --graph
logg = log --graph --color --decorate
#
amend = commit -a --amend
cm = !git commit -m
acm = !git add -A && git commit -m
save = !git add -A && git commit -m 'SAVEPOINT'
wip = commit -am "WIP"
wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard
up = !git fetch --all -p
bclean = "!f() { git checkout ${1-master} && git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs git branch -d; }; f"
bdone = "!f() { git checkout ${1-master} && git up && git bclean ${1-master}; }; f"
# onfire "!f() { git add -A && git commit -m 'FIRE IN THE HOLE!' && git push origin --force }; f"
#
unstage = reset HEAD --
undo = reset HEAD~1 --mixed
#
upull = !git up && git pull
tagformat = !git log --tags --simplify-by-decoration --pretty='format:%ai %d'
resetmaster = !git reset --hard origin/master
tagcommit = rev-list -n 1
tagscommits = show-ref --tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment