Update my zshrc with additional files, it was getting unruly, despite my hope with plugins/etc
This commit is contained in:
16
zsh/lib/git.zsh
Normal file
16
zsh/lib/git.zsh
Normal file
@ -0,0 +1,16 @@
|
||||
function git-parent-branch {
|
||||
git show-branch -a \
|
||||
| grep '\*' \
|
||||
| grep -v `git-rev-parse --abbrev-ref HEAD` \
|
||||
| head -n1 \
|
||||
| sed 's/.*\[\(.*\)\].*/\1/' \
|
||||
| sed 's/[\^~].*//'
|
||||
}
|
||||
alias gpb=git-parent-branch
|
||||
|
||||
# Use this to define the git lg alias
|
||||
function define_gitlg {
|
||||
git config --global alias.lg log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ar) %C(bold blue)<%an>%Creset' --abbrev-commit
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user