What's the best practice for a git branch that needs master to be constantly merged to it?

StackOverflow https://stackoverflow.com/questions/3754706

  •  04-10-2019
  •  | 
  •  

문제

I'm working on a project that has basically 2 branches: master and "next-version".

The two are constantly changed and the next-version needs to have the latest changes from master, but I can't just merge them both, because one version is published and the other one is still on alpha.

I currently merge master to next-version everytime a change happens, but this leads to ugly history.

What's the best practice in this case?

도움이 되었습니까?

해결책

If you're keeping the branch local you can do a git rebase master on next-version. Other than that you could cherry pick if you want to avoid merges, but this could hide the relation between the branches. You could also consider merging less often.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top