forked from dave1010/scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
43 lines (36 loc) · 1.34 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
s[user]
email = [email protected]
name = Dave Hulbert
[core]
#editor = nano
[color]
diff = auto
status = auto
branch = auto
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff
d = diff --color-words
# different logs
lg = log -p --decorate
l = "! git --no-pager log --oneline --graph -n 18 --decorate"
ll = "log --oneline --graph --decorate --branches"
# get the 1st changed file
f = "! git status --porcelain| awk '{ print $2 }' | head -n 1"
# overview of the whole project's history, tags, branches, with dates
overview = log --graph --simplify-by-decoration --decorate --pretty=format:'%cd%Cgreen%d %Cblue%h %Creset%s' --date=short
# allows you to use "git add -i" or "git add -p" with new files
stage-empty-file = "! git update-index --add --cacheinfo 100644 $(git hash-object -w /dev/null) "
# top level of repo
top=rev-parse --show-toplevel
# copy all generic hooks to this repos hook folder
setup-hooks="! cp -n ~/scripts/git-hooks/* $(git rev-parse --show-toplevel)/.git/hooks/"
[branch]
autosetupmerge = always
[push]
default = tracking
[merge]
stat = true