I have already looked through: Temporarily switch working copy to a specific Git commit Is it possible to switch between GIT commits? Git switching between commits However, I would like to sort out a specific topic:
I do not work in a team at present,
I use Git to save my project history locally (no GitHub or Bitbucket) and have only master branch,
I don't PUSH my commits outside .git in my working directory until end of project. My question is simple:
how can I safely return to one of my previous commits (kinda time machine) not having in mind to break existing tree indexes?
how can I ensure that files added after this specific commit will not be present in the working directory during this experiment?
how can I then safely return to HEAD of tree and once again - ensure that files deleted after that specific commit in the past (long time ago, not this time) will not be present in the working directory?
The reason I am asking about this is simple: I am learning now and therefore would like from time to time get back for a while to see (read-only) - what happened in the past (say a month ago).
Thank you.