Git Remove Accidental File From Pr
Scenario: Wrote code, did a PR, got comments and fixed them. Accidentally started work on a different piece of work but committed change to the same codebase as the previous PR
Fix:
- Open cmd
- Go to project directory
cd path\to\project
git checkout HEAD~1 \Path\To\File\File.cs
This reverts the file back to the last known copy before your changes were published.