'Checkout to one of squashed commits
In a repository with squash-merge practice, can I go to the state of the repository in one of the squashed commits?
For the example below, I want to find commit m1 by checking out commit r1.
m1 - m2 ------- m3 <- master (r1, r2, and r3 are squashed into m3)
\
r1 - r2 - r3 <- deleted branch
Solution 1:[1]
in git when you squash commits actually you are deleting them from the history, so, you don't have any chance to rollback (as I know) but try the following command :
git log
if you find your commit you can open it in temp branch by using this command :
git checkout COMMIT_HASH
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Anas Altarazi |
