-
Notifications
You must be signed in to change notification settings - Fork 0
/
.aliases_git
43 lines (42 loc) · 1.69 KB
/
.aliases_git
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
######################### GIT ALIASES #########################
alias g:n='git init && touch .gitignore'
alias g:r=gremote
alias g:v=gitstash
alias g:a='git add '
alias g:a.='git add .'
alias g:b='git branch'
alias g:b.='git branch -a'
alias g:bn='git checkout -b'
alias g:bn.='g:bn dev origin/dev'
alias g:bn..='g:bn dev && git push origin dev'
alias g:bd='git branch -d'
alias g:bd.='git branch -D'
alias g:c='git commit'
alias g:c.='git commit --amend'
alias g:co='git checkout'
alias g:cd='git checkout dev'
alias g:cl='git clone'
alias g:cm='git checkout main'
alias g:dw='git diff --color-words'
alias g:dw.='git diff --color-words main dev'
alias g:fo='git fetch origin'
alias g:i='git update-index --assume-unchanged'
alias g:i.='git update-index --no-assume-unchanged'
alias g:l='git log --oneline'
alias g:lb="git for-each-ref --sort=-committerdate --format='%(committerdate:relative)|%(refname:short)' refs/heads/ | column -s '|' -t"
alias g:lg="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
alias g:lp='git log -p -w'
alias g:ls="git log --stat --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
alias g:mm='git merge main'
alias g:mm.='git merge origin/main'
alias g:md='git merge dev'
alias g:md.='git merge origin/dev'
alias g:pl='git pull'
alias g:ps='git push'
alias g:psn='git push -u origin main'
alias g:ps.='this_branch=$(git rev-parse --abbrev-ref HEAD); git push --set-upstream origin $this_branch'
alias g:psz='git push origin --delete'
alias g:s='git status'
alias g:sr='git restore'
alias g:un='git rm --cached'
# END OF FILE