I've managed to get two unrelated branches somehow synchronized, such that git logs for both branches are now pretty much identical. Here's how I manged this feat:
- I was working in a branch
dev. - Fetched and checkout out
releaseBranch, but forgot to commit changes made todev. - Realized my mistake and checkout
devand committed my changes. - Deleted
releaseBranchand re-fetched and checkout another branch. - As shown below,
git lognow shows identical commits for not branches, and two HEADs
git log on dev
commit f6824f8f7e85d27087d91f7b2ed18d6ac0bb3b2c (HEAD -> releaseBranch, dev)
Author: Me <me@example.com>
Date: Mon Jan 23 12:13:17 2023 +0000
Last commit to dev
git log on release Branch
commit f6824f8f7e85d27087d91f7b2ed18d6ac0bb3b2c (HEAD -> dev, releaseBranch)
Author: Me <me@example.com>
Date: Mon Jan 23 12:13:17 2023 +0000
Last commit to dev
What's the best way to untangle myself from this mess?
git version 2.25.1