how can git checkout HEAD~2 go 10 commits back
问题 There's a remote branch my-issue-branch and a local branch of the same name. We performed git pull --rebase to get the latest commits locally, but the two last commits are breaking the build. We want to go 2 commits back to build the project and do git checkout HEAD~2 which takes us about 10 commits back, instead of just two. Only git checkout <commit-hash> helps the situation. Keeping in mind, that four people work on this branch, what can be wrong? 回答1: Here's a simplified diagram: ...--o--