-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
37 lines (29 loc) · 1.17 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
[alias]
ap = add -p
b = branch
cm = commit -m
co = checkout
cp = cherry-pick
diffc = diff --cached
s = status -s
ss = status
# reset current commit. committed diff becomes unstaged
rela = reset HEAD~1
# Apply currently staged changes to current commit. Will require force push if this commit was already pushed
ams = commit --amend --no-edit
# Move the chosen branch tip to HEAD. Will require force push if branch already pushed
# After this, check out name-of branch to point HEAD to this branch
mvhead = "!git branch --force $1 HEAD #"
# commit history. hide commits descending from HEAD, hide rebased commits.
t = log --graph --pretty=format':%C(yellow)%h%Cblue%d%Creset %s %C(white) %an, %ar%Creset'
## show ALL commits
tt = log --reflog --all --graph --pretty=format':%C(yellow)%h%Cblue%d%Creset %s %C(white) %an, %ar%Creset'
# show all commits changing a file. Run as $ git f [FILENAME]
f = log --follow --
# show all commits changing a file and show diffs
ff = log -p --follow --
[push]
autoSetupRemote = true
[core]
editor = "vim"
# TODO: add delta config