← Полезные советы
git restore file.py: Discard local changes in a specific Git file
Use git restore on a file when you intentionally want to discard its uncommitted local changes. Check git diff first if the changes matter.
git restore file.py
ОсторожноThis action can change data or working state. Check what it will do before you run it.
Почему это полезно
Use git restore on a file when you intentionally want to discard its uncommitted local changes. Check git diff first if the changes matter.
Как использовать
- Open the relevant app or terminal.
- Use the shortcut or command above in the relevant context.
- Check the result; for commands that change data, test on a small example first.
People also search for
git restore file.py: Discard local changes in a specific Git filegit restore file.pydiscard local changes in a specific git filehow to discard local changes in a specific git fileGit discard local changes in a specific git file