简体   繁体   中英

Alternative to git rebase on public branches

I have read that a public branch should never be rebased. If that's not the case, what else should be done with it? Does it have to be merged each time and then recreated?

It's very nice to uplift a public branch by merging it with whatever branch it's tracking. This of course gives you merge commits on the branch but it makes it very clear in the branch history when it was uplifted and what was added in between the uplifts.

It also works very well with gerrit if you're using that. A trivial uplift gives you an empty review window in gerrit.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM