.gitconfig

changeset 936
615fa36d953b
parent 935
17d8ea40fb15
child 961
68baaab84a0c
equal deleted inserted replaced
935:17d8ea40fb15 936:615fa36d953b
7 7
8 [init] 8 [init]
9 defaultBranch = main 9 defaultBranch = main
10 10
11 [alias] 11 [alias]
12 ci = commit 12 ci = commit
13 rec = commit -p 13 rec = commit -p
14 unrec = checkout --patch 14 unrec = checkout --patch
15 amend = commit -p --amend 15 amend = commit -p --amend
16 st = status -sb 16 st = status -sb
17 co = checkout 17 co = checkout
18 br = branch 18 br = branch
19 brd = diff @{u}.. 19 brd = diff @{u}..
20 brf = diff --name-only @{u}.. 20 brf = diff --name-only @{u}..
21 staged = diff --cached 21 staged = diff --cached
22 unstage = reset HEAD -- 22 unstage = reset HEAD --
23 rollback = reset --soft ^HEAD 23 rollback = reset --soft ^HEAD
24 pushf = push --force-with-lease 24 pushf = push --force-with-lease
25 up = pull -r --prune 25 up = pull -r --prune
26 update = "!git remote update -p && git merge --ff-only --stat @{u}" 26 update = "!git remote update -p && git merge --ff-only --stat @{u}"
27 in = "!git remote update -p; git log --pretty=onelinecustom ..@{u}" 27 in = "!git remote update -p; git log --pretty=onelinecustom ..@{u}"
28 out = "!git log --pretty=onelinecustom @{u}.." 28 out = "!git log --pretty=onelinecustom @{u}.."
29 new = "!git log --pretty=onelinecustom $1@{1}..$1@{0}" 29 new = "!git log --pretty=onelinecustom $1@{1}..$1@{0}"
30 glog = log --graph --pretty=onelinecustom 30 glog = log --graph --pretty=onelinecustom
31 recent = "!f() { git for-each-ref --count=20 --sort=-committerdate --format=\"%(committerdate:short) %(refname:short)\" ${1:-refs/heads} ${@:2}; }; f" 31 recent = "!f() { git for-each-ref --count=20 --sort=-committerdate --format=\"%(committerdate:short) %(refname:short)\" ${1:-refs/heads} ${@:2}; }; f"
32 orphan = "!f() { git fsck --dangling | grep commit | cut -d' ' -f3 | xargs git show --compact-summary; }; f" 32 orphan = "!f() { git fsck --dangling | grep commit | cut -d' ' -f3 | xargs git show --compact-summary; }; f"
33 fork-point = merge-base --fork-point @{u} 33 fork-point = merge-base --fork-point @{u}
34 34
35 [pretty] 35 [pretty]
36 onelinecustom = tformat:%C(magenta)%h%Creset %G? -%C(yellow)%d%Creset %s %C(green)(%cr)%Creset %C(cyan)<%an>%Creset 36 onelinecustom = tformat:%C(magenta)%h%Creset %G? -%C(yellow)%d%Creset %s %C(green)(%cr)%Creset %C(cyan)<%an>%Creset
37 37

mercurial