-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.aliases_git
More file actions
54 lines (39 loc) · 1.67 KB
/
.aliases_git
File metadata and controls
54 lines (39 loc) · 1.67 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
######################### GIT ALIASES #########################
alias 'g:r'=gremote
alias 'g:v'=gstash
alias 'g:bn'=gbranch
alias 'g:n'='git init && touch .gitignore'
alias 'g:a'='git add '
alias 'g:a_'='git add .'
alias 'g:b'='git branch'
alias 'g:b_'="git for-each-ref --sort=-committerdate --format='%(committerdate:relative)|%(refname:short)' refs/heads/ | column -s '|' -t"
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:cm'='git checkout main'
alias 'g:cl'='git clone'
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: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 fetch && git merge'
alias 'g:ps'='git push'
alias 'g:ps.'='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:ps:'='git push origin --delete'
alias 'g:s'='git status'
alias 'g:s_'='git restore'
alias 'g:un'='git rm --cached'
# END OF FILE