forked from colbycheeze/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
66 lines (55 loc) · 2.2 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
[init]
templatedir = ~/.git_template
[push]
default = current
[color]
ui = auto
[alias]
aa = add --all
ci = commit -v
# Commit all changes
ca = !git add -A && git commit -av
# Add all changes to last commit
caa = !git add -A && git commit --amend -av
# Switch to a branch, creating it if necessary
co = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"
# Rename local branch
rn = "!f() { git branch -m $1; }; f"
# Sync current branch by rebasing on top of develop
scb = !git pull origin develop --rebase
# Sync upstream with origin remote
gg = "!f() { old=$(git current-branch) && git checkout master && git pull upstream master && git push origin master && git checkout $old; }; f"
# Grab latest from upstream, sync with origin, and rebase changes from current branch on top
# Use this if you haven't pushed to your remote yet
ggr = "!f() { old=$(git current-branch) && git checkout master && git pull upstream master && git push origin master && git checkout $old && git rebase master; }; f"
# Grab latest from upstream, sync with origin, and merge changes from current branch
# Use this if you have already pushed changes to the remote
ggm = "!f() { old=$(git current-branch) && git checkout master && git pull upstream master && git push origin master && git checkout $old && git merge origin/master; }; f"
# Show the diff between the latest commit and the current state
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
# deploy a folder to gh-pages branch (public by default)
ghp = "!f() { git subtree push --prefix ${1:-public} origin gh-pages; }; f"
current-branch = !sh -c 'git rev-parse --abbrev-ref HEAD' -
delete-branch = !sh -c 'git push origin :refs/heads/$1 && git branch -D $1' -
[core]
excludesfile = ~/.gitignore
autocrlf = input
[commit]
template = ~/.gitmessage
[fetch]
prune = true
[include]
path = ~/.gitconfig.local
[filter "hawser"]
clean = git hawser clean %f
smudge = git hawser smudge %f
required = true
[user]
name = Colby Williams
email = [email protected]
[filter "lfs"]
clean = git lfs clean %f
smudge = git lfs smudge %f
required = true
[github]
user = colbycheeze