Merging a branch of a branch after first branch is squashed when merged to master

前端 未结 3 426
温柔的废话
温柔的废话 2021-01-29 19:17

Here\'s a workflow that I commonly deal with at work.

git checkout -b feature_branch
# Do some development
git add .
git commit
git push origin feature_branch
         


        
3条回答
  •  Happy的楠姐
    2021-01-29 19:56

    I heartily disagree with the "mash every feature development down into a single commit" policy, but it's their call...

    I'd keep the branches as-is, and create a mashed up commit just for publication, in a special branch. Being able to follow the development step by step is valuable, even if management doesn't believe in it. Mark the places of squashes by tags in the "real" branches, you could also add between-squash tags with messages pointing back to the real commits.

提交回复
热议问题