I work on a feature ( branch ), during the progress I deleted a file no longer used, but for some reason, I need it back.
So I did this :
git checkout hashofcommit0 -- path/to/my/file
It works but I've lost all annotations on the file. and I really need annotations.
Of course, I can create a new branch, apply all diff done with my last branch ( except the file removed ), and be happy.
(0) -> (1) -> (..) -> (n)
Is there a solution to go back to a commit(0), undo the remove, and go back to last commit(n) with no conflict?