Added p4merge as mergetool in git config (only if OS is windows).
This commit is contained in:
parent
1f4657d7c7
commit
08721fbe71
@ -14,17 +14,17 @@
|
|||||||
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]%Creset%Cgreen\\ (%cd)" --decorate --numstat --date=relative
|
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]%Creset%Cgreen\\ (%cd)" --decorate --numstat --date=relative
|
||||||
ld = log --pretty=format:"%C(yellow)%h\\ %C(green)%ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short --graph
|
ld = log --pretty=format:"%C(yellow)%h\\ %C(green)%ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short --graph
|
||||||
ls = log --pretty=format:"%C(green)%h\\ %C(yellow)[%ad]%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative
|
ls = log --pretty=format:"%C(green)%h\\ %C(yellow)[%ad]%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative
|
||||||
|
|
||||||
# Short summary of commiters
|
# Short summary of commiters
|
||||||
summary = shortlog --summary --numbered --email
|
summary = shortlog --summary --numbered --email
|
||||||
|
|
||||||
# https://stackoverflow.com/questions/5188320/how-can-i-get-a-list-of-git-branches-ordered-by-most-recent-commit
|
# https://stackoverflow.com/questions/5188320/how-can-i-get-a-list-of-git-branches-ordered-by-most-recent-commit
|
||||||
# list remote branches ordered by date
|
# list remote branches ordered by date
|
||||||
rr = for-each-ref --sort=-committerdate refs/remotes/ --count=20 --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
|
rr = for-each-ref --sort=-committerdate refs/remotes/ --count=20 --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
|
||||||
|
|
||||||
# show tracked files
|
# show tracked files
|
||||||
ls-tracked = ls-tree -r --name-only HEAD
|
ls-tracked = ls-tree -r --name-only HEAD
|
||||||
|
|
||||||
# show number of commits per author
|
# show number of commits per author
|
||||||
# https://stackoverflow.com/questions/9839083/git-number-of-commits-per-author-on-all-branches
|
# https://stackoverflow.com/questions/9839083/git-number-of-commits-per-author-on-all-branches
|
||||||
stats = shortlog -s -n --all --no-merges
|
stats = shortlog -s -n --all --no-merges
|
||||||
@ -45,26 +45,44 @@
|
|||||||
ss = status -s --branch -uno
|
ss = status -s --branch -uno
|
||||||
co = checkout
|
co = checkout
|
||||||
pr = remote prune origin
|
pr = remote prune origin
|
||||||
|
|
||||||
# from pixelbeat
|
# from pixelbeat
|
||||||
brdate = for-each-ref --sort=-committerdate --format='%(committerdate:iso8601) %(refname:short)' refs/heads/
|
brdate = for-each-ref --sort=-committerdate --format='%(committerdate:iso8601) %(refname:short)' refs/heads/
|
||||||
st = stash list --date=local
|
st = stash list --date=local
|
||||||
alias = ! git config --get-regexp ^alias\\. | sed -e s/^alias\\.// -e s/\\ /\\ =\\ /
|
alias = ! git config --get-regexp ^alias\\. | sed -e s/^alias\\.// -e s/\\ /\\ =\\ /
|
||||||
d = diff -w
|
d = diff -w
|
||||||
dc = diff -w --cached
|
dc = diff -w --cached
|
||||||
|
|
||||||
# from https://www.toptal.com/developers/gitignore
|
# from https://www.toptal.com/developers/gitignore
|
||||||
# create .gitignore templates based on operationg systems, IDE, languages etc.
|
# create .gitignore templates based on operationg systems, IDE, languages etc.
|
||||||
ignore = "!gi() { curl -sL https://www.toptal.com/developers/gitignore/api/$@ ;}; gi"
|
ignore = "!gi() { curl -sL https://www.toptal.com/developers/gitignore/api/$@ ;}; gi"
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
editor = vim
|
editor = vim
|
||||||
|
|
||||||
[push]
|
[push]
|
||||||
# default = matching
|
# default = matching
|
||||||
default = simple # safer option, push only current branch
|
default = simple # safer option, push only current branch
|
||||||
|
[pull]
|
||||||
|
ff = only
|
||||||
|
|
||||||
|
{{ if eq .chezmoi.os "windows" -}}
|
||||||
[merge]
|
[merge]
|
||||||
tool = p4merge
|
tool = p4merge
|
||||||
ff = false
|
ff = false
|
||||||
[pull]
|
|
||||||
ff = only
|
[mergetool "p4merge"]
|
||||||
|
path = "C:\\Program Files\\Perforce\\p4merge.exe"
|
||||||
|
cmd = p4merge $BASE $LOCAL $REMOTE $MERGED
|
||||||
|
keepBackup = false
|
||||||
|
|
||||||
|
[difftool "p4merge"]
|
||||||
|
external = p4merge $LOCAL $REMOTE
|
||||||
|
|
||||||
|
[difftool "winmerge"]
|
||||||
|
cmd = "'c:/PortableApps/PortableApps/WinMergePortable/App/WinMerge/WinMergeU'" -e "$LOCAL" "$REMOTE"
|
||||||
|
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
|
[http]
|
||||||
|
# proxy = http://host:port
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user