Skip to content

Commit

Permalink
Add gfu a CLI to interactively fixup a commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackjacx committed Nov 10, 2023
1 parent b25fec2 commit 199d36e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bootstrap/dotfiles/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,14 @@ glogp() {
git --no-pager log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%ad) %C(bold blue)<%an>%Creset' --date=iso8601 $(git show-branch | grep '*' | grep -v "$(git rev-parse --abbrev-ref HEAD)" | head -n1 | sed 's/.*\[\(.*\)\].*/\1/' | sed 's/[\^~].*//')..
}

gfu() {
ga . && glogp && echo "Which commit hash should I use for fixup? " && read commit_hash && gcfu $commit_hash
}

greload () {
local current_branch=$(git branch --show-current) && git switch develop && git branch -D $current_branch && git checkout $current_branch && git pull
}

gupdate () {
gfa
gco develop
Expand Down

0 comments on commit 199d36e

Please sign in to comment.