Restore a single file
Imagine you are working on a feature branch. But you want to restore one file to the original version of the main branch.
git restore -s main path/to/file
s like "source branch"
(avoid git checkout)
Imagine you are working on a feature branch. But you want to restore one file to the original version of the main branch.
git restore -s main path/to/file
s like "source branch"
(avoid git checkout)