Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amending commits like git-citool does #1627

Closed
aik opened this issue Nov 19, 2020 · 1 comment
Closed

Amending commits like git-citool does #1627

aik opened this issue Nov 19, 2020 · 1 comment

Comments

@aik
Copy link

aik commented Nov 19, 2020

My usual scenario is git citool, then click on the amend checkbox, unstange chunks and press commit (and then commit unstaged chunks separately as "debug stuff"). I am looking for the same functionality in fugitive but it looks like there is no way to edit a commit, only add to it, what do I miss? Thanks.

@ghost
Copy link

ghost commented Nov 21, 2020

You could achieve this in git by doing git reset --soft HEAD~1 and then git reset --patch. First command moves back one commit, but leave all chunks staged. Second allows to interactively unstage chunks, like git add --patch, but the opposite. Also :Gstatus has keybindings to stage/unstage chunks.

@tpope tpope closed this as completed Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants