reworked git plugin alias

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
This commit is contained in:
Gaetan Semet 2014-03-12 12:11:53 +01:00
commit e135ddfb1d
3 changed files with 15 additions and 14 deletions

View file

@ -9,7 +9,6 @@
br = branch br = branch
co = checkout co = checkout
df = diff df = diff
lg = log -p
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
loo = log --pretty=oneline --abbrev-commit loo = log --pretty=oneline --abbrev-commit
lol = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit lol = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
@ -30,6 +29,7 @@
branches = branch -a branches = branch -a
remotes = remote -v remotes = remote -v
sync = fetch --all sync = fetch --all
root = rev-parse --show-toplevel
# This only works if git > 0.7.10 # This only works if git > 0.7.10
# # [include] # # [include]

View file

@ -72,7 +72,7 @@ alias gm='git merge'
compdef _git gm=git-merge compdef _git gm=git-merge
alias grh='git reset HEAD' alias grh='git reset HEAD'
alias grhh='git reset HEAD --hard' alias grhh='git reset HEAD --hard'
alias gclean='git reset --hard && git clean -dfx' alias gclean='(cd $(git rev-parse --show-toplevel) && git reset --hard && git clean -dfx)'
alias gwc='git whatchanged -p --abbrev-commit --pretty=medium' alias gwc='git whatchanged -p --abbrev-commit --pretty=medium'
#remove the gf alias #remove the gf alias
@ -156,5 +156,5 @@ alias gunignore='git update-index --no-assume-unchanged'
# list temporarily ignored files # list temporarily ignored files
alias gignored='git ls-files -v | grep "^[[:lower:]]"' alias gignored='git ls-files -v | grep "^[[:lower:]]"'
alias tiga='tig --all'

View file

@ -253,7 +253,8 @@ compdef _git gke='gitk'
# Clean # Clean
# Remove all .orig, .BASE.*, .REMOTE.*, .LOCAL.*, *.BACKUP files # Remove all .orig, .BASE.*, .REMOTE.*, .LOCAL.*, *.BACKUP files
alias gclean=" find . -name '*.orig' -or -name '*.REMOTE.*' -or -name '*.LOCAL.*' -or -name '*.BACKUP.*' -or -name '*.BASE.*' | xargs -r rm -v" alias gclean="find $(git rev-parse --show-toplevel) -name '*.orig' -or -name '*.REMOTE.*' -or -name '*.LOCAL.*' -or -name '*.BACKUP.*' -or -name '*.BASE.*' | xargs -r rm -v"
alias gcleanreset='(cd $(git rev-parse --show-toplevel) && git reset --hard && git clean -dfx)'
# Edit global Git configuration files # Edit global Git configuration files
alias gitconfig="vim ~/.gitconfig" alias gitconfig="vim ~/.gitconfig"