Skip to content

Latest commit

 

History

History
35 lines (21 loc) · 1.15 KB

revert.md

File metadata and controls

35 lines (21 loc) · 1.15 KB

How to revert a work

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)

Git Bash

  1. Open up Git Bash
  2. Navigate to the project folder
  3. Type in git restore file_that_you_wanted_to_restore

Visual Studio Code

Original Files Modified Files
image image

To revert from modified files to unmodified/original file,

  1. Click on the icon "arrow pointed to the left" on the top right corner

    revert_3

  2. The VS Code will show you something like this,

    revert_4

  3. To revert some part of the lines (for example, removing the line 14), you can directly edit on the right panel

    Before After
    iamge iamge
  4. And proceed with coding!