|
|
|
|
|
by rane
2452 days ago
|
|
You might find this git alias useful. Wrote it a few years ago and find it useful daily. [alias]
fix = "!_() { c=$(git rev-parse $1) && git commit --fixup $c && if grep -qv \"No local changes\" <<<$(git stash); then s=1; fi; git -c core.editor=cat rebase -i --autosquash $c~; if [[ -n "$s" ]]; then git stash pop; fi; }; _"
The workflow becomes: $ git add ... # stage the changes you want to apply to 6138d3a
$ git fix 6138d3a
|
|
Thank you!