mirror of
https://github.com/namibia/tips.git
synced 2024-12-22 18:18:58 +00:00
Restore deleted file.
This commit is contained in:
parent
8181a37dd1
commit
7078656d7c
@ -72,6 +72,7 @@
|
||||
* [Don’t consider changes for tracked file.](https://github.com/git-tips/tips#dont-consider-changes-for-tracked-file)
|
||||
* [Undo assume-unchanged.](https://github.com/git-tips/tips#undo-assume-unchanged)
|
||||
* [Clean the files from `.gitignore`.](https://github.com/git-tips/tips#clean-the-files-from-gitignore)
|
||||
* [Restore deleted file.](https://github.com/git-tips/tips#restore-deleted-file)
|
||||
|
||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||
<!-- @doxie.inject end toc -->
|
||||
@ -503,5 +504,10 @@ git update-index --no-assume-unchanged <file_name>
|
||||
git clean -X -f
|
||||
```
|
||||
|
||||
## Restore deleted file.
|
||||
```sh
|
||||
git checkout <deleting_commit>^ -- <file_path>
|
||||
```
|
||||
|
||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||
<!-- @doxie.inject end -->
|
||||
|
Loading…
Reference in New Issue
Block a user