I have checked out in a fix branch and have edited two files (file1.ext
, file2.ext
) and made in two commits. By mistake I wrote a @todo in another file (file3.ext
) and committed it in the first commit with file1.ext
. But the todo had nothing to do with the fix. I have not done a push to remote yet!
Now my question is, how can I delete the file3.ext from the first commit?
$ git reflog
1bf987f6 (HEAD -> fix/1000-lorem) HEAD@{0}: commit: [2.0][UI-1000] Fix: lorem ipsum
81123e93 HEAD@{1}: commit: [2.0][UI-1000] Fix: lorem ipsum
My consideration
I would now delete the @todo from file3.ext
again and commit. So the file would be at least without todo and therefore up to date. Are there any other, better ways to solve the problem?