Home > Software engineering >  How revert changes after doing undo stage
How revert changes after doing undo stage

Time:08-30

After I made a change to the file in the project under Git and before I added or committed it, I did an undo changes and now I want to return the changes I made. What is the required command?

CodePudding user response:

undo changes will discard any changes you made to the file since the last commit.

You cannot undo undone changes. That's why you had to confirm a dialog that asked if you were sure you wanted to do this.

If you want to undo changes that you can add again later stash them.

  •  Tags:  
  • git
  • Related