I saw an answer to a question here that helps restore a deleted file in git.
The solution was
git checkout <deleting_commit>^ -- <deleted_file_path>
What does the caret character (^
) do? I’ve seen it elsewhere doing very useful things in git. It’s magical. Someone please spoil it for me and tell me what it does?
^
) is the escape character in cmd.exe. Every time I've tried to use it to see if it would be helpful I was actually passing nothing, which explains why the results were never different. >_> Stupid cmd.exe. You can escape it by doubling it or quoting it:git log master^^
orgit log "master^"
– bambams