Reputation: 559
I have 3 main branches: PROD
, TEST
, and DEVELOP
and developers work in feature branches that are created from the PROD
branch. And then the feature branch is merged into the environment branches at the respective point in its lifecycle.
I am now seeing commits in PROD
and FEATURE
branch that should only exist in the TEST
branch. I don't know if the FEATURE
branch was incorrectly created from the TEST
branch (and then merged into PROD
), or if the TEST
branch was merged into the FEATURE
branch before the FEATURE
branch was merged back into the PROD
branch. Or possibly the TEST
branch was incorrectly merged into the PROD
branch before the FEATURE
branch was created.
I've tried using gitk on both the PROD
and FEATURE
branches, which is how I'm seeing the TEST
branch commits in those branches, but how can I determine when, who, and how this was messed up?
Upvotes: 0
Views: 206
Reputation: 40841
To see a nice pretty line graph between all your branches that you can scroll back in time to see what got merged where, use:
git log --graph --oneline --decorate --all
If you want to investigate those fishy commits on the PROD
branch, then you can just look at it's graph history which will include branch paths that were merged into it with:
git log PROD --graph --oneline --decorate
Upvotes: 2
Reputation: 1150
git log --graph
will show the author and date of the commits/merges
Upvotes: 0