-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
102 lines (89 loc) · 4.16 KB
/
.gitconfig
File metadata and controls
102 lines (89 loc) · 4.16 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
# This is Git's per-user configuration file.
[user]
# Please adapt and uncomment the following lines:
name = Tom Iles
email = tom.iles@ahc.com
[diff]
[color]
ui = auto
[alias]
st = status
ci = commit --verbose
co = checkout
di = diff
dc = diff --cached
amend = commit --amend
aa = add --all
ff = merge --ff-only
noff = merge --no-ff
fa = fetch --all
pom = push origin master
ds = diff --stat=160,120
dh1 = diff HEAD~1
# Divergence (commits we added and commits remote added)
div = divergence
# Goodness (summary of diff lines added/removed/total)
gn = goodness
gnc = goodness --cached
# Fancy logging.
# h = head
# hp = head with patch
# r = recent commits, only current branch
# ra = recent commits, all reachable refs
# l = all commits, only current branch
# la = all commits, all reachable refs
# b = all branches
# bs = all branches, sorted by last commit date
head = !git r -1
h = !git head
hp = "!. ~/.githelpers && show_git_head"
r = !GIT_NO_PAGER=1 git l -30
ra = !git r --all
l = "!. ~/.githelpers && pretty_git_log"
la = !git l --all
b = "!. ~/.githelpers && pretty_git_branch"
bs = "!. ~/.githelpers && pretty_git_branch_sorted"
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
#shortcut for showing status pf repo
ls = !git lg --all -15
# https://gist.github.com/robmiller/6018582
# Get the current branch name (not so useful in itself, but used in other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
# Delete the remote version of the current branch
unpublish = "!git push origin :$(git branch-name)"
# Delete a branch and recreate it from master — useful if you have, say,
# a development branch and a master branch and they could conceivably go
# out of sync
recreate = "!f() { [[ -n $@ ]] && git checkout \"$@\" && git unpublish && git checkout master && git branch -D \"$@\" && git checkout -b \"$@\" && git publish; }; f"
# Fire up your difftool (e.g. Kaleidescope) with all the changes that
# are on the current branch.
code-review = difftool origin/master...
# Given a merge commit, find the span of commits that exist(ed) on that
# branch. Again, not so useful in itself, but used by other aliases.
merge-span = "!f() { echo $(git log -1 $2 --merges --pretty=format:%P | cut -d' ' -f1)$1$(git log -1 $2 --merges --pretty=format:%P | cut -d' ' -f2); }; f"
# Find the commits that were introduced by a merge
merge-log = "!git log `git merge-span .. $1`"
# Show the changes that were introduced by a merge
merge-diff = "!git diff `git merge-span ... $1`"
# As above, but in your difftool
merge-difftool = "!git difftool `git merge-span ... $1`"
# Interactively rebase all the commits on the current branch
rebase-branch = "!git rebase -i `git merge-base master HEAD`"
# Unstage any files that have been added to the staging area
unstage = reset HEAD
# Delete any branches that have been merged into master
# See also: https://gist.github.com/robmiller/5133264
delete-merged-branches = "!git co master && git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
#git commitsAtDate 2017-08-18
commitsAtDate = "!f() { git log --pretty='format:%C(yellow)%h %G? %ad%Cred%d %Creset%s%C(cyan) [%cn]' --decorate --after=\"$1 0:00\" --before=\"$1 23:59\" --author \"`git config user.name`\"; }; f"
#git commitsAtDate 2017-08-18
synWithTimes= "!f() { git log --pretty='%ad %s' --decorate --after=\"$1 0:00\" --before=\"$1 23:59\" --date=format:'%H:%M:%S' --author \"`git config user.name`\"; }; f"
#git commitsAtDate 2017-08-18
syn = "!f() { git log --pretty='%s' --decorate --after=\"$1 0:00\" --before=\"$1 23:59\" --author \"`git config user.name`\"; }; f"
[merge]
tool = fugitive
[mergetool "fugitive"]
cmd = nvim -f -c \"Gdiff\" \"$MERGED\"