I'd like to restore the files of the git working copy to a given commit, without setting that commit as the HEAD commit.
If I git checkout to a given commit I obtain a detached HEAD, and after commiting changes, the commit tree would look something like:
A
|
B
|
C
| \
D E
While the behaviour I'd like to obtain is:
A
|
B
|
C
|
D
| <- git command so my files are restored to C, but my HEAD still points to D
E
Thanks