-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
48 lines (38 loc) · 1.53 KB
/
.gitconfig
File metadata and controls
48 lines (38 loc) · 1.53 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
[user]
name = Chris Peterson
# https://git-scm.com/docs/git-config#Documentation/git-config.txt-includeIfltconditiongt
[includeIf "hasconfig:remote.*.url:https://github.com/**"]
path = ~/.gitconfig-public
[includeIf "hasconfig:remote.*.url:git@github.com:*/**"]
path = ~/.gitconfig-public
[includeIf "hasconfig:remote.*.url:https://gitlab.com/**"]
path = ~/.gitconfig-public
[includeIf "hasconfig:remote.*.url:git@gitlab.com:*/**"]
path = ~/.gitconfig-public
[init]
defaultBranch = main
[core]
# https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreautocrlf
autocrlf = input
[push]
# https://git-scm.com/docs/git-config#Documentation/git-config.txt-pushautoSetupRemote
autoSetupRemote = true
[pull]
# https://git-scm.com/docs/git-config#Documentation/git-config.txt-pullrebase
rebase = true
[rebase]
# https://git-scm.com/docs/git-config#Documentation/git-config.txt-rebaseautoStash
autoStash = true
[diff]
# https://git-scm.com/docs/git-config#Documentation/git-config.txt-difftool
tool = kdiff3
[merge]
# https://git-scm.com/docs/git-config#Documentation/git-config.txt-mergetool
tool = kdiff3
[mergetool]
# https://git-scm.com/docs/git-config#Documentation/git-config.txt-mergetoolkeepBackup
keepBackup = false
[alias]
main = !"git remote show origin | sed -n '/HEAD branch/s/.*: //p'"
up = !"git switch $(git main) && git pull --prune && git switch @{-1}"
web = !"git rev-parse --is-inside-work-tree >/dev/null && open \"https://$(git remote get-url origin | sed 's/git@//' | sed 's/\\.git$//' | sed 's/:/\\//' )\""