I am developing a system where I’m following the trails of another project, adding my own stuff but not directly to the original project. I setup my repository with three remote branches:
- Master – Where my development takes place.
- Vendor – Where I sync with the original project periodically.
- Integration – Where I want to merge (Master) and (Vendor) together.
My workflow idea is for the synchronization to take place automatically (since it’s basically a fast-forward of sorts), and the integration to be half-manual (since it requires merges and fixes). I’ve got the first part (the sync) covered, but I can’t figure out what command/s to actually issue to integrate Master and Vendor into integration.
This is the output of git branch -a:
* integration
master
vendor
remotes/origin/HEAD -> origin/master
remotes/origin/integration
remotes/origin/master
remotes/origin/vendor
How do I go forward from this point to:
- Synchronize this workspace with the remote repository?
- Merge vendor & master into integration?
- Push integration back to the remote repository?
And obviously, if I have something wrong in the workflow I’d love to hear it.
While the
integrationbranch is not strictly necessary (you could integrate directlyvendorintomaster, by rebasingmasteron top ofvendor), it can be useful.Integrating a branch
Ain a branchBcan be done by:AinB(but that means any current development you have inBis “on hold” pending the resolutions of any merge conflict, and the re-runs of all the tests)Bon top ofA(git rebase A), but that would changeB‘s history.I would rebase
integrationon top ofVendor, solving any conflict there, and then mergeintegrationinmaster, keepingmasterhistory linear.