I have done a git rm -r path/
. I have commit it, and after that I have seen that I have not done git rm --cached
. I have searched for going back, and I have done also: git reset --soft 'HEAD^'
2 times. Now I see that I have got back on my git tree, but I do not see the removed files...
* <I_do_not_know_the_head> commit after removing files (1)
* <I_do_not_know_the_head> commit before removing files (2)
* <I_do_know_the_head> current commit (3)
* ... other commits (4)
I am now at (3)
and I do not see the commits (1)
and (2)
. I want to get to back (1)
and then get the removed files. The problem is that I think I have done some other changes, too, not just removed those files.
How to go back to the last commit and then just add the removed files? Please help, I do not want to loose commits.