memoir/pages/git/reset-files.md

12 lines
149 B
Markdown
Raw Permalink Normal View History

2023-05-16 08:50:32 +00:00
# Reset Files
How to reset files from another branch.
```sh
2024-10-21 14:03:38 +00:00
# New way
git restore my/file.md
# Old way
2023-05-16 08:50:32 +00:00
git checkout origin/HEAD -- my/file.md
```