-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
51 lines (41 loc) · 1005 Bytes
/
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
44
45
46
47
48
49
50
51
# -*- mode: gitconfig; -*-
[color]
ui = auto
[alias]
alias = "!f(){ git config -l | grep alias; };f"
st = status --short --branch
ci = commit
co = checkout
cp = cherry-pick
br = branch
showtrackedignored = "ls-files -i --exclude-standard"
current-branch = rev-parse --abbrev-ref HEAD
cb = current-branch
rd = rev-parse --show-toplevel
wt = worktree
wta = "!f(){ git worktree add $(git rd)/git-worktrees/$1 $1; };f"
wtab = "!f(){ git worktree add $(git rd)/git-worktrees/$1 -b $1; };f"
wtc = "!f(){ rm -r $(git rd)/git-worktrees 2> /dev/null; git wt prune; };f"
download = "!f(){ git clone --recursive --depth=1 --branch ${3:-master} $1 $2; };f"
dl = download
# Mark a repo as trusted
trust = "!mkdir -p .git/safe"
[commit]
template = ~/.gitmessage
[fetch]
prune = true
[submodule]
recurse = true
[include]
path = ~/.gitconfig.local
[github]
user = yewton
[rebase]
autoStash = true
[init]
defaultBranch = main
[pull]
rebase = true
[merge]
autoStash = true
ff = false