-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprivate_dot_gitconfig
54 lines (42 loc) · 1.18 KB
/
private_dot_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
[includeIf "gitdir:~/go/src/github.com/"]
path = .gitconfig-github
[includeIf "gitdir:~/go/src/gitlab.com/"]
path = .gitconfig-gitlab
[includeIf "gitdir:~/go/src/gitlab.com/xolv/"]
path = .gitconfig-gitlab-xolv
[core]
editor = vim
pager = less -xR
excludesfile = ~/.gitignore
[advise]
pushNonFastForward = false
[stash]
showPatch = true
[pull]
rebase = false
[init]
defaultBranch = main
[diff]
tool = icdiff
[difftool]
prompt = false
[difftool "icdiff"]
cmd = icdiff --line-numbers $LOCAL $REMOTE
[alias]
df = difftool
stats = shortlog -sn --all --no-merges
recent = for-each-ref --count=10 --sort=-committerdate refs/heads/ --format="%(refname:short)"
graph = log --graph --all --decorate --stat --date=iso
root = rev-parse --show-toplevel
fixup = "!f() { \
REMOTE=$(git config --get remote.origin.url); \
MASTER=$(git remote show ${REMOTE} | grep 'HEAD branch' | cut -d ' ' -f 5); \
BRANCH=${1:-${MASTER}}; \
git reset --soft ${BRANCH}; \
}; f"
lo = log --oneline
sha = rev-parse --short HEAD
lsha = rev-parse HEAD
[advice]
# ignore horrible advice when push fails
pushNonFastForward = false