I am working on a project, and we have many people working on it. We have 2 branches:
- main
- develop
When someone gets a task, they make a new branch for their task derived from develop and once they finish it it is approved via pull request to the develop branch using squash commit. This is important as feature might be worked on over few days and it can consist of many commits that we aren't particularly interested in. Once tested, the feature is approved to be transfered to the main branch.
We transfer the feature using cherry picking. This is why to us it is useful to have squash commit, because 1 feature becomes 1 commit that we cherry pick to main.
Suppose we have 5 new features on develop branch, all merged using squash commit. When compared, behind counter is 0 and ahead counter is 5 compared to the main branch. Perfectly logical. But if i want to cherry-pick 1 of those 5 commits from develop to the main i expected counter to show 0 for behind and 4 for ahead counter after it is done. This isn't the case unfortunately as cherry-picking makes new hash for the commit.
I expected i could use those counters to track features i have deployed to the main and it kind of bothers me that those counters stray away from each other by the day. How can i achieve what i expected?