summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Jaeger <git-commit@henk.geekmail.org>2020-11-25 00:14:03 +0100
committerHendrik Jäger <gitcommit@henk.geekmail.org>2020-11-25 00:46:13 +0100
commite53b639c3013fd200e76ae39296d8a4e566d1b19 (patch)
treec855ac6d4067656ff5f7d4a697392c33755441b6
parente69dc04be35e858ceb3cb7cced41c052ac66ba99 (diff)
More settings and updates
-rw-r--r--.config/git/config30
1 files changed, 23 insertions, 7 deletions
diff --git a/.config/git/config b/.config/git/config
index 399a3a7..53e10fb 100644
--- a/.config/git/config
+++ b/.config/git/config
@@ -5,6 +5,9 @@
[branch]
# always make new branches rebase on their tracking branch
autosetuprebase = always
+[commit]
+ # show diff in commit message editor
+ verbose = true
[diff]
# use (i)ndex, (w)orktree, (c)ommit, etc instead of a/ and b/
mnemonicprefix = true
@@ -12,6 +15,11 @@
renames = copies
# use different color for moved code (default == zebra, currently)
colorMoved = default
+ # use vimdiff as difftool
+ tool = vimdiff
+[difftool]
+ # do not prompt before invoking difftool
+ prompt = false
[fetch]
# delete tracking references and info about remote branches
# does not delete any branches
@@ -22,12 +30,24 @@
[grep]
# show linenumber (-n)
lineNumber = true
+[log]
+ # show short commit sha
+ abbrevCommit = true
+ # show short ref names but only in terminal
+ decorate = auto
[merge]
# only do fastforward merges
ff = only
+ # use vimdiff as mergetool
+ tool = vimdiff
+[pretty]
+ longline = %C(auto)%h %<(52,trunc)%s (%aN, %GS %G?, %cr) %d
+ longlines = %C(auto)%h %<(52,trunc)%s (%aN, %GS %G?, %cr) %d %n%-w(0,8,8)%+b%-
[push]
# push to branch with same name on remote
default = current
+ # also push reachable annotated tags
+ followTags = true
[pull]
# rebase, don’t merge, local changes
rebase = true
@@ -61,16 +81,11 @@
cpc = cherry-pick --continue
c = commit
+ ca = commit --all
cm = commit --message
cma = commit --all --message
cmv = commit --verbose
cmav = commit --all --verbose
- amend = commit --amend
- ca = commit --amend
- cam = commit --amend --message
- can = commit --amend --no-edit
- caa = commit --amend --all
- cana = commit --amend --all --no-edit
fix = commit --all --fixup
diff = diff --word-diff
@@ -93,6 +108,7 @@
lll = log --graph --topo-order --date=iso8601-strict --no-abbrev-commit --abbrev=40 --decorate --all --boundary --pretty=format:'%Cgreen%ad %Cred%h%Creset -%C(yellow)%d%Creset %s %Cblue[%cn <%ce>]%Creset %Cblue%G?%Creset'
lc = "!f() { git ll "$1"^.."$1"; }; f"
lnc = log --pretty=format:"%h\\ %s\\ [%cn]"
+ lo = log --oneline
lp = log --patch
fl = log -u
filelog = log -u
@@ -143,4 +159,4 @@
wl = worktree list
- serve = !git daemon --reuseaddr --verbose --base-path=. --export-all ./.git
+ serve = daemon --reuseaddr --verbose --base-path=. --export-all ./.git