Lets suppose git log shows versions:
fff ... ccc bbb aaa How to get back to version bbb and commit it without destroying history. So that git log would show:
bbb* fff ... ccc bbb aaa You want to try doing git revert:
git revert -n fff eee ddd ccc And of course, you can use notations like master~4..master etc.
git revert -n bbb..master. Suppose every new year I have to bring new year version of web page ar logo. Counting hundreds of commits is not an option :)bbb..master. That is why I said etc.git revert -n 510862f12f857c98ae..master results in fatal: Cannot find '510862f12f857c98ae..master'. Does it work for you?
git reset --hard bbbis not enough because it destroys history.git checkout bbbis not enough because it does not commit.