-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
57 lines (47 loc) · 1.84 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
[user]
email = [email protected]
name = Philip Nelson
[log]
decorate = true
[alias]
d = diff
pl = pull
co = checkout
cb = checkout -b
amend = commit --amend --no-edit
see = "!f() { git show $1:$2 | bat --language ${2##*.}; }; f"
# get the main branch
default = !git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@'
# getter log
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset - %Cblue%an%Creset' --abbrev-commit --date=relative
# list all the files tracked by git
ls = ls-tree --full-tree -r --name-only HEAD
# simplified status with branch name
s = status -sb
# Lists the files with the most churn
churn = !git --no-pager log --name-only --oneline | grep -v ' ' | sort | uniq -c | sort -nr | head
# Deletes all branches merged into the specified branch (or the default branch if no branch is specified)
bclean = "!f() { DEFAULT=$(git default); git branch --merged ${1-$DEFAULT} | grep -v " ${1-$DEFAULT}$" | xargs git branch -d; }; f"
# Show list of files in a conflict state.
conflicts = !git diff --name-only --diff-filter=U
# Display all dangling commits
show-reflog = "!git log --graph --all --numstat --oneline --decorate --full-history --date-order --color $(git fsck | grep dangling | awk '{print $3;}')"
[pager]
branch = false
[credential]
helper = cache --timeout=28800
[init]
defaultBranch = main
[includeIf "gitdir:~/DEV/OTHER/"]
path = ~/.gitconfig-personal
[includeIf "gitdir:~/DEV/SENTINEL/"]
path = ~/.gitconfig-sentinel
; [includeIf "hasconfig:remote.*.url:[email protected]*/**"]
[includeIf "gitdir:~/DEV/EMMA/"]
path = ~/.gitconfig-isrhub
[includeIf "gitdir:~/DEV/SDL/"]
path = ~/.gitconfig-isrhub
[includeIf "gitdir:~/DEV/SENTINEL_ADMIN/"]
path = ~/.gitconfig-sentinel-admin
[includeIf "gitdir:~/DEV/SANDBOX/"]
path = ~/.gitconfig-sandbox