Skip to content

Instantly share code, notes, and snippets.

@marcoala
Last active December 19, 2018 15:06
Show Gist options
  • Save marcoala/77d0499ba63d9d5f3c5c1add9c0ff30b to your computer and use it in GitHub Desktop.
Save marcoala/77d0499ba63d9d5f3c5c1add9c0ff30b to your computer and use it in GitHub Desktop.
Some line of my .gitconfig file
[user]
name = Marco Alabruzzo
email = marco.alabruzzo@gmail.com
# signingkey = KEY_HERE
[merge]
conflictstyle = diff3
[push]
default = simple
[alias]
unadd = reset HEAD
undo = reset --soft HEAD~1
update = pull --rebase --prune
# pull master and then merge
merge-master = "!git fetch origin master:master; git merge master"
# compact status
s = "!git rev-parse --abbrev-ref HEAD; git status -s"
# show diff of the last commit
show-last = diff HEAD~1 HEAD
# remove all unstaged file, tracked and not
real-clean = "!git clean -df; git checkout -- ."
# pretty log
ls = log --pretty=format:\"%C(yellow)[%cn] %ad\\ %Cred%d\\ %Creset%s\\ %Cgreen%h\" --graph --date=relative
# list branches sorted by last modified
b = "!git for-each-ref --sort='-authordate' --format='%(refname)' refs/heads | sed -e 's-refs/heads/--'"
# list aliases
aliases = "!git config -l | grep alias | cut -c 7-"
# avoid the --set-upstream stuff
gut = "!git push -u origin $(git rev-parse --abbrev-ref HEAD)"
true-stash = stash --include-untracked --keep-index
[pull]
ff = only
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment