-[help]
- autocorrect = 10
-[branch]
- autosetupmerge = always
- autosetuprebase = always
-[rebase]
- autosquash = true
- autostash = true
-[pull]
- rebase = true
-[push]
- default = simple
-[diff]
- tool = vimdiff
-[merge]
- tool = vimdiff
-[difftool "vimdiff"]
- prompt = false
- conflictstyle = diff3
-[mergetool "vimdiff"]
- prompt = false
-[difftool "bc"]
- path = bcompare
- trustExitCode = false
-[mergetool "bc"]
- path = bcompare
- trustExitCode = false
-[init]
- templatedir = ~/.config/git/templates
-[core]
- editor = vim
- pager = less
-[filter "lfs"]
- clean = git-lfs clean %f
- smudge = git-lfs smudge %f
- required = true
-[alias]
-# shortcuts
- pp = "!git pull --rebase && git push"
- up = "!git pull --rebase --prune $@ && git submodule update --init --recursive"
- co = checkout
- co = checkout
- ci = commit
- st = status
- ls = ls-files
- cl = clone --recurse-submodules -j8
- dt = difftool
- mt = mergetool
- undo = reset --soft HEAD^
- unci = reset --soft HEAD~
- una = reset HEAD --
- uha = checkout HEAD --
- unaa = reset HEAD
- uhaa = reset --hard HEAD
- sb = status -sb
- amend = commit --amend
- a = add
- br = branch
- brdm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
- go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"
- diff = diff --word-diff
- # dont pull without rebase, and dont push without pull (fetch & merge)
- # avoid merge commits
- mf = merge --ff-only
- cp = cherry-pick
- wc = whatchanged -p
- ch = cherry -v
- fs = "!git fetch && git status"
- rb = rebase
- ec = config --global -e
- l = log --oneline --decorate
- lg = log --pretty=format:"%C(yellow)%h\\ %C(green)%ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short --graph
- lol = log --oneline --decorate --graph --all --first-parent
- last = log -1 HEAD
- lt = tag -l
- type = cat-file -t
- dump = cat-file -p
- who = shortlog -s --
- remotes = remote -v
- root = rev-parse --show-toplevel
-
- # Show the diff between the latest commit and the current state
- d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
- # `git di $number` shows the diff between the state `$number` revisions ago and the current state
- di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d"
-
- # Find branches containing commit
- fb = "!f() { git branch -a --contains $1; }; f"
- # Find tags containing commit
- ft = "!f() { git describe --always --contains $1; }; f"
- # Find commits by source code
- fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f"
- # Find commits by commit message
- fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"
-
- #Credit an author on the latest commit
- credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"
- # List contributors with number of commits
- contributors = shortlog --summary --numbered
-
- ctags = "!sh -c '[ -f .git/hooks/ctags ] || git init; .git/hooks/ctags' git-ctags"
- gtags = "!sh -c '[ -f .git/hooks/gtags ] || git init; .git/hooks/gtags' git-gtags"
- cscope = "!sh -c '[ -f .git/hooks/cscope ] || git init; .git/hooks/cscope' git-cscope"
-
-[include]
- path = ~/.gitconfig.local
+[core]\r
+ editor = vim\r
+ pager = less\r
+ autocrlf = false\r
+[help]\r
+ autocorrect = 10\r
+[branch]\r
+ autosetupmerge = always\r
+ autosetuprebase = always\r
+[rebase]\r
+ autosquash = true\r
+ autostash = true\r
+[pull]\r
+ rebase = true\r
+[push]\r
+ default = simple\r
+[diff]\r
+ tool = vimdiff\r
+[merge]\r
+ tool = vimdiff\r
+[difftool "vimdiff"]\r
+ prompt = false\r
+ conflictstyle = diff3\r
+[mergetool "vimdiff"]\r
+ prompt = false\r
+[difftool "bc"]\r
+ path = bcompare\r
+ trustExitCode = false\r
+[mergetool "bc"]\r
+ path = bcompare\r
+ trustExitCode = false\r
+[init]\r
+ templatedir = ~/.config/git/templates\r
+[filter "lfs"]\r
+ clean = git-lfs clean %f\r
+ smudge = git-lfs smudge %f\r
+ required = true\r
+[alias]\r
+# shortcuts\r
+ pp = "!git pull --rebase && git push"\r
+ up = "!git pull --rebase --prune $@ && git submodule update --init --recursive"\r
+ co = checkout\r
+ co = checkout\r
+ ci = commit\r
+ st = status\r
+ ls = ls-files\r
+ cl = clone --recurse-submodules -j8\r
+ dt = difftool\r
+ mt = mergetool\r
+ undo = reset --soft HEAD^ \r
+ unci = reset --soft HEAD~\r
+ una = reset HEAD --\r
+ uha = checkout HEAD --\r
+ unaa = reset HEAD\r
+ uhaa = reset --hard HEAD\r
+ sb = status -sb\r
+ amend = commit --amend\r
+ a = add\r
+ br = branch\r
+ brdm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"\r
+ go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"\r
+ diff = diff --word-diff\r
+ # dont pull without rebase, and dont push without pull (fetch & merge)\r
+ # avoid merge commits\r
+ mf = merge --ff-only\r
+ cp = cherry-pick\r
+ wc = whatchanged -p\r
+ ch = cherry -v\r
+ fs = "!git fetch && git status"\r
+ rb = rebase\r
+ ec = config --global -e\r
+ l = log --oneline --decorate\r
+ lg = log --pretty=format:"%C(yellow)%h\\ %C(green)%ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short --graph\r
+ lol = log --oneline --decorate --graph --all --first-parent\r
+ last = log -1 HEAD\r
+ lt = tag -l\r
+ type = cat-file -t\r
+ dump = cat-file -p\r
+ who = shortlog -s --\r
+ remotes = remote -v\r
+ root = rev-parse --show-toplevel\r
+\r
+ # Show the diff between the latest commit and the current state\r
+ d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"\r
+ # `git di $number` shows the diff between the state `$number` revisions ago and the current state\r
+ di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD -- || clear; d"\r
+\r
+ # Find branches containing commit\r
+ fb = "!f() { git branch -a --contains $1; }; f"\r
+ # Find tags containing commit\r
+ ft = "!f() { git describe --always --contains $1; }; f"\r
+ # Find commits by source code\r
+ fc = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short -S$1; }; f"\r
+ # Find commits by commit message\r
+ fm = "!f() { git log --pretty=format:'%C(yellow)%h %Cblue%ad %Creset%s%Cgreen [%cn] %Cred%d' --decorate --date=short --grep=$1; }; f"\r
+\r
+ #Credit an author on the latest commit\r
+ credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"\r
+ # List contributors with number of commits\r
+ contributors = shortlog --summary --numbered\r
+\r
+ ctags = "!sh -c '[ -f .git/hooks/ctags ] || git init; .git/hooks/ctags' git-ctags"\r
+ gtags = "!sh -c '[ -f .git/hooks/gtags ] || git init; .git/hooks/gtags' git-gtags"\r
+ cscope = "!sh -c '[ -f .git/hooks/cscope ] || git init; .git/hooks/cscope' git-cscope"\r
+\r
+[include]\r
+ path = ~/.gitconfig.local\r