Add new git aliases for the new git functions

This commit is contained in:
Sameer Rahmani 2022-11-24 11:11:44 +00:00
parent 93542a3506
commit e09ccf99d9
2 changed files with 8 additions and 1 deletions

View File

@ -39,6 +39,9 @@ alias pull="git_pull"
alias pu="git_push"
alias pl="git_pull"
alias gr="git restore --staged"
alias show=git_show_branch_filter
alias show_all=git_show_filter
alias fixup=git_fixup
alias kff="kernel_find_file"

View File

@ -160,10 +160,14 @@ function git_uncommit() {
git restore --staged .
}
function git_show_filter() {
function git_show_branch_filter() {
git show $(g log --pretty=format:"%h %an %ad %s" origin/HEAD..HEAD |filter|cut -d ' ' -f 1 |xargs)
}
function git_show_filter() {
git show $(g log --pretty=format:"%h %an %ad %s" |filter|cut -d ' ' -f 1 |xargs)
}
function git_fixup() {
git commit "$1" --fixup $(g log --pretty=format:"%h %an %ad %s" origin/HEAD..HEAD |filter|cut -d ' ' -f 1 |xargs)
}