diff options
Diffstat (limited to 'gitconfig')
-rw-r--r-- | gitconfig | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/gitconfig b/gitconfig new file mode 100644 index 0000000..57ca8f8 --- /dev/null +++ b/gitconfig @@ -0,0 +1,63 @@ +[core] + editor = nvim +[user] + useConfigOnly = true +[commit] + gpgsign = true +[push] + default = simple +[alias] + s = status + a = add + ap = add -p + ps = push + pl = pull + cl = clone + cr = clone --recursive + cs = clone --single-branch --depth=1 + br = branch + co = checkout + ci = commit + cm = commit -m + ec = config --global --edit + amend = commit -a --amend + lt = log --graph --decorate --oneline --abbrev-commit --all + ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate + ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat + le = log --oneline --decorate + dl = "!git ll -1" + df = diff + dfs = diff --staged + dfc = diff --cached + ours = "!f() { git co --ours \"$@\" && git add \"$@\"; }; f" + theirs = "!f() { git co --theirs \"$@\" && git add \"$@\"; }; f" + sneak = "!f() { git commit --amend --no-edit "$@" && git push -f "$@"; }; f" + test = "!echo \"$@\"; echo \"$@\"" + origin = remote show origin + set-origin = remote set-url origin + add-origin = remote add origin + modpull = submodule update --remote --merge + pruner = !"git prune --expire=now; git reflog expire --expire-unreachable=now --rewrite --all" + repacker = !git repack -a -d -f --depth=300 --window=300 --window-memory=1g + optimize = !git pruner; git repacker; git prune-packed + sm = submodule + smrm = "!f(){\ + git submodule deinit -f \"$1\";\ + rm -rf .git/modules/\"$1\";\ + git rm -f \"$1\";\ + }; f" + + dcm = "!f(){ git commit -m \"$(date --iso-8601=seconds)\"; }; f" + dps = "!f(){ git dcm; git push \"$@\"; }; f" + + ident = "!f(){\ + git config --replace-all user.name \"$1\";\ + git config --replace-all user.email \"$2l\";\ + if [ -n \"$3\" ]; then\ + git config --replace-all user.signingkey \"$3\";\ + git config --replace-all commit.gpgsign true;\ + fi;\ + }; f" + +[color] + ui = true |