I used Squash and Merge for merging dev branch into main because I didn't want some of the commit messages from dev branch to appear in main
But now I found out that main is 1 commit ahead of dev.
And the graph shows that there is no connection between dev and main. This is something I have not seen before, and I have used Squash and merge for the first time
The graph of the repository:
Now, should I do:
git checkout devgit rebase main
Else, what should I do after I did Squash and Merge to prevent unexpected problems from occurring.
Here, I cannot understand the situation. I may be thinking wrong. In that case, please tell me what is correct.
My workflow:
I have two long-lived branches main & dev. Then I have short-lived branches feature, bug, hotfix, etc. The main branch always remains production-ready. And I will delete the last feature branch when I merge dev into main
My dev branch looks like this:
The main branch looks like this:
Note:
- I am a newbie in git. So, my thinking can be wrong. If this is the case, please point out my mistake and tell me what is correct.


