0

I'm trying to restore my stable tag by removing the most recent commit. I ran this command:

git revert e64218b5d415419043002e67115f81bff05bde0e

This appeared:

    error: Your local changes would be overwritten by revert.
    hint: Commit your changes or stash them to proceed.
    fatal: revert failed

I left this message and closed the file. After verifying that crazy.html was gone, I took a look at my history with git log --oneline

e64218b Add a crazzzy experiment
2d0b4b6 Add navigation links
35a79d5 Create blue and orange pages
f72749b Create index page

Why didn't Git figure out how to undo the changes that it contained? Why didn't Git tack on another commit with the resulting content?

Edit - Git status shows:

On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)

deleted:    crazy.html

1 Answers1

0

you can do git stash, git pull, and git stash pop

pedrorijo91
  • 7,635
  • 9
  • 44
  • 82