How to Git Reset a Single File
It’s very easy to reset files that have not yet been committed to git.
Reset a single file
|
|
You can also specify the filename as the path to the file, like so:
|
|
This will checkout the file from HEAD.
It is important to note that should you have a file that is the same name as a branch, you will need to rather run the following command:
|
|
Reset an entire branch
To reset an entire branch, you can reset it directly against the HEAD.
|
|