100339/how-to-reset-or-revert-a-file-to-a-specific-version
Hi Team,
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?
Hi@akhtar,
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
Hi@Shashi, 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
Hi@akhtar, You can use git checkout <sha1> to check ...READ MORE
Hi@akhtar, You can untrack your file from git ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.