git :: how to undo changes to a single file
How to undo changes in a single file, using git
To get rid of the stupid changes you have made in a single file, without effecting important changes in other files use,
|
|
Yes, that is the same command used to switch between branches.
If the branch name is same the filename, do this
|
|
Note:git checkout --hard
will reset all the files. Use that when you are certain about that.
Author: Deepu Mohan Puthrote
Link: https://deepumohan.com/tech/git-reset-single-file/
This work by Deepu Mohan Puthrote is licensed under a Creative Commons Attribution 4.0 International License