Created
June 17, 2020 14:37
-
-
Save thiagosf/cb1042dff7891c93635ae23cf966ae51 to your computer and use it in GitHub Desktop.
Revisions
-
thiagosf created this gist
Jun 17, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ List commits with file is inside ```bash git log --oneline --follow -- path/to/file ``` The result looks like: ``` 8266b41 Removing file fb4d75c Another commit ``` Copy, for example `8266b41`, and restore file like that: ```bash git checkout 8266b41^ -- path/to/file ``` :rocket: