There's a moment where you wanted to revert the work done to a file. Here's how to revert a work/file.
Example: (fishballs.cpp)
- Open up Git Bash
- Navigate to the project folder
- Type in
git restore
file_that_you_wanted_to_restore
Original Files |
Modified Files |
|
|
To revert from modified files to unmodified/original file,
-
Click on the icon "arrow pointed to the left" on the top right corner
-
The VS Code will show you something like this,
-
To revert some part of the lines (for example, removing the line 14), you can directly edit on the right panel
Before |
After |
|
|
-
And proceed with coding!