I made some changes in a file in Git repository. But because of some reasons I want to revert or reset to the previous version of that file. How to do that?
To revert a specific file to that commit, you can use the git reset command. You can think of it as a rollback it points your local environment back to a previous commit.
$ git reset <commit hash> <filename>
When I revert this commit:
git reset --hard ...READ MORE
This is simple, just follow the below ...READ MORE
You can easily do this in one ...READ MORE
You can use the git clean command. ...READ MORE
Hey @nmentityvibes, you seem to be using ...READ MORE
Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE
It can work if you try to put ...READ MORE
When you use docker-compose down, all the ...READ MORE
You can use git checkout <sha1> to check ...READ MORE
You can untrack your file from git ...READ MORE
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.