Restore (staged)
Restore (staged)
We can do the same even if the file was staged for commit (we may not use this in real world) as shown in the below steps-
Before trying this out you might want to modify the file again and add it for staging and then check the status
Notice that the latest status shows the file as not staged for commit because we just unstaged it if you want to unmodified it as well, we can issue git restore . command
at this point!
A reload might be required in the text editor to reflect the changes which Git is doing!
Last updated