-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
98 lines (89 loc) · 3.08 KB
/
.gitconfig
File metadata and controls
98 lines (89 loc) · 3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
[core]
fileMode = false
autocrlf = input
editor = code --wait
[push]
default = simple
[rerere]
enabled = true
[gitflow "prefix"]
versiontag = v
[fetch]
prune = true
pruneTags = true
[pull]
rebase = true
[rebase]
updateRefs = true
autoStash = true
[init]
defaultBranch = main
[alias]
alias = config --get-regexp ^alias\\.
amend = commit --amend
amend-no-edit = commit --amend --no-edit
commit-all = !git add --all && git commit
commit-all-amend = !git add --all && git commit --amend
commit-all-amend-no-edit = !git add --all && git commit --amend --no-edit
branch-delete-fully = "!f() { git branch -D $1; git push (git remote) --delete $1; }; f"
branch-delete-merged = "!git branch --merged | grep -v '\\*\\|master\\|main\\|develop' | xargs -n 1 git branch -d"
branch-delete-squashed = "!git checkout -q main && git for-each-ref refs/heads/ \"--format=%(refname:short)\" | while read branch; do mergeBase=$(git merge-base main $branch) && [[ $(git cherry main $(git commit-tree $(git rev-parse $branch^{tree}) -p $mergeBase -m _)) == \"-\"* ]] && git branch -D $branch; done"
branch-name = "!git rev-parse --abbrev-ref HEAD"
branches-recent = "!git branch --sort=-committerdate --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'"
clean-fully = clean -xfd
check-ignore-verbose = check-ignore -v
checkout-branch = checkout -b
checkout-track = checkout -t
discard = "!git reset --hard; git clean -fd"
hash-short = rev-parse --short HEAD
my-history = !git log --author=$(git config user.email) --format="format:%Cblue%ad%n%s%n%b%n"
pull-force = "!branch=`git branch-name`; git checkout main; git branch $branch -D; git checkout -t origin/$branch"
push-force = push --force
publish = "!git push -u origin $(git branch-name)"
squash = "!f() { git reset --soft HEAD~$1 && git commit; }; f"
stash-staged = stash save --keep-index --include-untracked \"remove-unstaged\"
sync-tags = fetch --prune --pruneTags
unwip = reset HEAD~
wip = !sh -c 'git add --all && git commit -n -q -m WIP'
aa = add --all
amd = !git amend
amdne = !git amend-no-edit
b = branch
bl = branch -av
bd = branch -d
bdf = !git branch-delete-fully
bdm = !git branch-delete-merged
bds = !git branch-delete-squashed
bn = !git branch-name
br = !git branches-recent
ca = !git commit-all
caa = !git commit-all-amend
caane = !git commit-all-amend-no-edit
cl = !git clean-fully
civ = !git check-ignore-verbose
co = checkout
cob = !git checkout-branch
cot = !git checkout-track
cm = commit
cmn = commit --no-verify
dc = !git discard
fa = fetch --all
hsh = !git hash-short
mh = !git my-history
pl = pull
plf = !git pull-force
plr = pull --rebase
pshn = push --no-verify
pshf = !git push-force
pshfn = !git push-force --no-verify
pub = !git publish
pubn = !git publish --no-verify
rb = rebase
rbc = rebase --continue
rbi = rebase --interactive
rbs = rebase --skip
rba = rebase --abort
rh = reset --hard
s = status
ss = !git stash-staged
st = !git sync-tags