Skip to content

Instantly share code, notes, and snippets.

@nweldev
Last active July 23, 2018 13:17
Show Gist options
  • Save nweldev/9c02aeecb833df211861e885e83773b4 to your computer and use it in GitHub Desktop.
Save nweldev/9c02aeecb833df211861e885e83773b4 to your computer and use it in GitHub Desktop.
my .gitconfig for work
[user]
# Please adapt and uncomment the following lines:
name = Noël Macé
email = [email protected]
[log]
date = iso
[format]
#pretty = format:%C(yellow)%h %Cblue%>(14)%ad %Cgreen%<(15)%aN%Cred%d %Creset%s
[alias]
# Beautiful logs
# from http://stackoverflow.com/questions/1057564/pretty-git-branch-graphs
# this aliases are useless when using oh-my-zsh git plugin instead
# quick look at all repo
# loggsa = log --color --date-order --graph --pretty=format:'%C(yellow)%h %Cgreen%aN%Cred%d %Creset%s' --decorate --simplify-by-decoration --all
# quick look at active branch (or refs pointed)
# loggs = log --color --date-order --graph --oneline --decorate --simplify-by-decoration
# extend look at all repo
# logga = log --color --date-order --graph --oneline --decorate --all
# #extend look at active branch
# logg = log --color --date-order --graph --oneline --decorate
# #Look with date
# logda = log --color --date-order --date=local --graph --format=\"%C(auto)%h%Creset %C(blue bold)%ad%Creset %C(auto)%d%Creset %s\" --all
# logd = log --color --date-order --date=local --graph --format=\"%C(auto)%h%Creset %C(blue bold)%ad%Creset %C(auto)%d%Creset %s\"
# #Look with relative date
# logdra = log --color --date-order --graph --format=\"%C(auto)%h%Creset %C(blue bold)%ar%Creset %C(auto)%d%Creset %s\" --all
# logdr = log --color --date-order --graph --format=\"%C(auto)%h%Creset %C(blue bold)%ar%Creset %C(auto)%d%Creset %s\"
permission-reset = !git diff -p -R | grep -E \"^(diff|(old|new) mode)\" | git apply
renameTag = "!sh -c 'set -e;git tag $2 $1; git tag -d $1;git push origin :refs/tags/$1;git push --tags' -"
[push]
default = simple
[diff]
tool = default-difftool
[difftool "default-difftool"]
cmd = code --wait --diff $LOCAL $REMOTE
[core]
editor = code --wait
eol = lf
autocrlf = input
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment