简体   繁体   中英

Maintain two parallel git branches that share patches

I need to maintain two git branches of an open source project. The first branch official is basically a clone of the official repo. The second branch custom contains some custom patches. Some of those patches have been merged into the official repo. How do I keep custom upto date with the official repo while not causing conflicts ?

If custom is not published (say, the commits in custom that don't appear in official aren't pushed to any other repository), you can git fetch and then git rebase official in order to get your commits applied on top of the official branch.

If that doesn't work for you, you can always pull official into custom , generating merge commits whenever you update your branch.

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