File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 7272* [ Don’t consider changes for tracked file.] ( https://github.com/git-tips/tips#dont-consider-changes-for-tracked-file )
7373* [ Undo assume-unchanged.] ( https://github.com/git-tips/tips#undo-assume-unchanged )
7474* [ Clean the files from ` .gitignore ` .] ( https://github.com/git-tips/tips#clean-the-files-from-gitignore )
75+ * [ Restore deleted file.] ( https://github.com/git-tips/tips#restore-deleted-file )
7576
7677<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
7778<!-- @doxie.inject end toc -->
@@ -503,5 +504,10 @@ git update-index --no-assume-unchanged <file_name>
503504git clean -X -f
504505```
505506
507+ ## Restore deleted file.
508+ ``` sh
509+ git checkout < deleting_commit> ^ -- < file_path>
510+ ```
511+
506512<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
507513<!-- @doxie.inject end -->
Original file line number Diff line number Diff line change 288288 {
289289 "title" : " Clean the files from `.gitignore`." ,
290290 "tip" : " git clean -X -f"
291+ },
292+ {
293+ "title" : " Restore deleted file." ,
294+ "tip" : " git checkout <deleting_commit>^ -- <file_path>"
291295 }
292296]
You can’t perform that action at this time.
0 commit comments