I accidentally amended my previous commit. The commit should have been separate to keep a history of the changes I made to a particular file.
Is there a way to undo that last commit? If I do something like git reset --hard HEAD^, the first commit also is undone.
(I have not yet pushed to any remote directories)