-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
43 lines (43 loc) · 1.51 KB
/
.gitconfig
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
[core]
longpaths = true
editor = nvim
[user]
email = [email protected]
name = John Lee
[branch]
sort = committerdate
[alias]
alias = config --get-regexp alias
c = commit -m
kick = "!git commit --allow-empty -m \"kick pipe\" && git push"
pushf = push --force-with-lease
pushff = push -f
unskip = update-index --no-skip-worktree
skip = update-index --skip-worktree
fetchall = fetch --all
prdiff = "!f() { branch=${1:-HEAD}; git diff $(git merge-base master \"$branch\"); }; f"
prlog = "!f() { branch=${1:-HEAD}; git log --oneline $(git merge-base master \"$branch\")..\"$branch\"; }; f"
pradds = "!f() { branch=${1:-HEAD}; git diff --name-only --diff-filter=A $(git merge-base master \"$branch\"); }; f"
prmods = "!f() { branch=${1:-HEAD}; git diff --name-only --diff-filter=M $(git merge-base master \"$branch\"); }; f"
fzcheckout = !git checkout $(git branch | tac | fzf)
ghclone = "!f() { git clone [email protected]:\"$1\"/\"$2\"; }; f"
ghremoteadd = "!f() { git remote add \"$1\" [email protected]:\"$2\"/\"$3\"; }; f"
pullup = pull upstream master
pushup = push upstream master
resetup = "!git fetch && git reset --hard @{upstream}"
rebaseup = "!git fetch && git rebase @{upstream}"
aa = commit -a --noedit
restorehard = "!f() { git restore --staged $1 && git restore $1; }; f"
pushup = "!git push -u origin $(git branch --show-current)"
[push]
autoSetupRemote = true
[http]
postbuffer = 52428800
[rebase]
autoStash = true
[safe]
directory = *
[fetch]
writeCommitGraph = true
[init]
defaultBranch = master