-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
69 lines (68 loc) · 2.15 KB
/
.gitconfig
File metadata and controls
69 lines (68 loc) · 2.15 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
[credential "https://github.com"]
helper =
helper = !/usr/bin/gh auth git-credential
[credential "https://gist.github.com"]
helper =
helper = !/usr/bin/gh auth git-credential
[user]
email = r@rbi.nz
name = Ryan Binns
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[alias]
cm = commit -m
cam = commit -am
cane = commit --amend --no-edit
lo = log --pretty=format:'%an - %h %s %ar'
st = status
br = branch
sw = show
df = diff
fe = fetch
mg = merge
rb = rebase
rom = rebase origin/master
romaster = rebase origin/master
romain = rebase origin/main
rt = remote -v
co = checkout
pf = push -f
po = push origin
pu = pull origin
pom = push origin master
pum = pull origin master
com = checkout master
pod = push origin develop
pud = pull origin develop
cod = checkout develop
pog = push origin gh-pages
pug = pull origin gh-pages
cog = checkout gh-pages
hist = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
undo = reset --soft HEAD~1
graph = log --oneline --graph
rmfile = reset HEAD^ --
beupstream = reset --hard @{upstream}
beup = beupstream
frompf = !"git fetch && git rebase origin/master && git push -f"
# commits since last command
new = !sh -c 'git log $1@{1}..$1@{0} "$@"'
# rebase branch popping off comits up to HEAD~N
pop = "!f() { git rebase --onto origin/master $2~$1 $2; }; f"
# cleanup merged branches
bclean = "!f() { git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs -r git branch -d; }; f"
# add a subtree
sta = "!f() { git subtree add --prefix $2 $1 master --squash; }; f"
# simple diff ignoring line number changes
sortdiff = !sh -c 'git diff "$@" | grep "^[+-]" | sort --key=1.2 | uniq -u -s1'
stash-staged = "!bash -c \"git stash --keep-index; git stash push -m \"staged\" --keep-index; git stash pop stash@{1}\""
# print lines of code in files and repo
loc = ls-files | xargs wc -l
ignore = update-index --assume-unchanged
unignore = update-index --no-assume-unchanged
ignored = !git ls-files -v | grep "^[[:lower:]]"
[sequence]
editor = code --wait