I know how to
but what I want is to exclude the renamed file from last git commit, but retain anything else (as git mv get into my commit unintentionally).
How can I do that?
(Seems I can only revert everything or not at all...)
I know how to
but what I want is to exclude the renamed file from last git commit, but retain anything else (as git mv get into my commit unintentionally).
How can I do that?
(Seems I can only revert everything or not at all...)
Copyright © 2021 Jogjafile Inc.
You can search the internet for "git how can I change my latest commit content", you will find documentation pages such as :
One generic way to "change the latest commit" is to edit files and
git addthem as you want, then rungit commit --amend.This works for any kind of modifications: the commit will simply contain the new content you
git added.For example:
git mv old.txt new.txt:old.txtbut not addnew.txtin the commit:etc ...