Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I really loved the idea of fixup + rebase, but of course we didn't have an example here :)

So I spend half an hour to learn about git shell commands in aliases (had to learn the hardware that arguments require functions) and came up with the following.

fixup = "!f() { git commit --fixup ${1} && GIT_SEQUENCE_EDITOR=true git rebase --autosquash --interactive --rebase-merges \"${1}~1\"; }; f"

from https://gitlab.com/olliver/dotfiles/-/blob/master/.config/gi...

Hope this helps anybody else :)



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: