forked from mathiasbynens/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
executable file
·119 lines (110 loc) · 3.52 KB
/
Copy path.gitconfig
File metadata and controls
executable file
·119 lines (110 loc) · 3.52 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
[user]
name = Daniel W. Robert
email = danielwrobert@gmail.com
[github]
user = danielwrobert
email = danielwrobert@gmail.com
[alias]
# View the current working tree status using the short format
s = status -s
# Diff
d = diff --patch-with-stat
# Pull in remote changes for the current repository and all its submodules
p = !"git pull; git submodule foreach git pull origin master"
# Clone a repository including all submodules
c = clone --recursive
# View the SHA, description, and history graph of the latest 20 commits
l = log --pretty=oneline -n 20 --graph
# Nice git log with commit authors and all branches displayed
lol = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --all
# A relly nice, single-line log list
lg = log --pretty=format:\"%C(yellow)%h %C(blue)%ad%C(red)%d %C(reset)%s%C(green) [%cn]\" --decorate --date=short
# Log and show full commit messages
lgfull = log --no-expand-tabs --pretty=full
graph = log --graph --pretty=format':%C(yellow)%h%Cblue%d%Creset %s %C(white) %an, %ar%Creset'
standup = log --since '1 day ago' --oneline --author danielwrobert@gmail.com
# A few others
st = status
sts = status -sb
ci = commit
# Commit all changes
cia = commit -a
br = branch
co = checkout
# Switch to a branch, creating it if necessary
cob = checkout -B
df = diff
ds = diff --staged
pu = pull
ps = push
amend = commit --amend -C HEAD
undo = reset --soft HEAD^
# Undo a `git push`
undopush = push -f origin HEAD^:master
g = grep -n
gi = grep -ni
# Show verbose output about tags, branches or remotes
tags = tag -l
branches = branch -a
remotes = remote -v
# Credit an author on the latest commit
credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"
# Interactive rebase with the given number of latest commits
reb = "!r() { git rebase -i HEAD~$1; }; r"
[apply]
# Detect whitespace errors when applying a patch
whitespace = fix
[core]
# Use custom `.gitignore` and `.gitattributes`
excludesfile = ~/.gitignore
attributesfile = ~/.gitattributes
# Treat spaces before tabs, lines that are indented with 8 or more spaces, and all kinds of trailing whitespace as an error
whitespace = space-before-tab,indent-with-non-tab,trailing-space
autocrlf = input # may want to set to false to use linux line endings.
editor = /usr/local/bin/vim
[format]
pretty = format:%C(yellow)%H %C(green)%ad%n%C(reset)%s %C(blue)[%cn]%C(magenta)%d%n
[color]
# Use colors in Git commands that are capable of colored output when outputting to the terminal
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[merge]
# Include summaries of merged commits in newly created merge commit messages
log = true
tool = diffmerge
# Use `origin` as the default remote on the `master` branch in all cases
[branch "master"]
remote = origin
merge = refs/heads/master
# URL shorthands
[url "git@github.com:"]
insteadOf = "gh:"
pushInsteadOf = "github:"
pushInsteadOf = "git://github.com/"
[url "git://github.com/"]
insteadOf = "github:"
[url "git@gist.github.com:"]
insteadOf = "gst:"
pushInsteadOf = "gist:"
pushInsteadOf = "git://gist.github.com/"
[url "git://gist.github.com/"]
insteadOf = "gist:"
[mergetool "diffmerge"]
cmd = diffmerge --merge\n--result=$MERGED $LOCAL $BASE $REMOTE
trustExitCode = true
[pull]
rebase = false
[init]
defaultBranch = main