Reset File to Main Branch

To reset the file to the default branch, i.e. the main branch, run the following command:

git checkout main -- <file-name>

This will reset the file on your git branch so that there are no changes when compared to main

Last Updated: 30/08/2023

Published: 30/08/2023