-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
50 lines (50 loc) · 2.08 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
[include]
path = ~/.gitconfig.local
[alias]
co = checkout
f = fetch -p
ec = config --global -e
up = !git pull --rebase origin master
upd = !git pull --rebase origin develop
cob = checkout -b
cm = !git add -A && git commit -m
save = !git add -A && git commit -m 'SAVEPOINT'
wip = !git add -u && git commit -m "WIP"
undo = reset HEAD~1 --mixed
amend = commit -a --amend
wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard
bclean = "!f() { git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs git branch -d; }; f"
bcleand = "!f() { git branch --merged ${1-develop} | grep -v " ${1-develop}$" | xargs git branch -d; }; f"
bdone = "!f() { git checkout ${1-master} && git up && git bclean ${1-master}; }; f"
bdoned = "!f() { git checkout ${1-develop} && git upd && git bcleand ${1-develop}; }; f"
migrate = "!f(){ CURRENT=$(git symbolic-ref --short HEAD); git checkout -b $1 && git branch --force $CURRENT ${3-'$CURRENT@{u}'} && git rebase --onto ${2-master} $CURRENT; }; f"
open = "!f() { REPO_URL=$(git config remote.origin.url); explorer ${REPO_URL%%.git}; }; f"
browse = !git open
pom = pull origin master
pod = pull origin develop
# from jessfraz https://github.com/jessfraz/dotfiles/blob/master/.gitconfig
branches = branch -a
s = status -s
p = !"git pull; git submodule foreach git pull origin master"
c = clone --recursive
alias=!git config -l | grep ^alias | cut -c 7- | sort
dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d; git remote -v update -p"
rhh = reset HEAD --hard
# from https://dev.to/nickytonline/my-git-aliases-5dea
a = add .
colast = checkout -
last = log -1 HEAD
lop = log --pretty=format:"%h%x09%an%x09%ad%x09%s" --no-merges
pf = push --force-with-lease
pr = pull --rebase
ra = rebase --abort
rc = rebase --continue
stashes = stash list
# from benmatselby
lol = log --graph --decorate --color --date=iso
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
[user]
email = [email protected]
name = markgaze
[help]
autocorrect = 50