tpope / vim-fugitive

fugitive.vim: A Git wrapper so awesome, it should be illegal
https://www.vim.org/scripts/script.php?script_id=2975
20.01k stars 1.01k forks source link

Feature request: Rebase to the commit the current line was edited in #2311

Closed jclsn closed 4 months ago

jclsn commented 4 months ago

I often find myself in the situation where I need to exchange a value in a line that was changed in a previous commit. I then have to look at the blame, copy the commit hash, git rebase -i $hash and change. Since fugitive already comes with blame support, I think it would be neat if you could rebase directly to this commit. Do you think this is possible?

tpope commented 4 months ago

First make your change and stage it (e.g., with :Gwrite). Then switch back to the blame window and press cF on that line to create a fixup commit and rebase it in automatically.

jclsn commented 4 months ago

I kind of suspected you already had a way to do this! :D Thanks