Keeping Forks in Sync
In the typical workflow we had adopted for using Git, developers were making topic branches, and then using rebase to bring in changes from master and then going back and merging their branch.
With pull requests, you work off your fork, creating pull requests then going back to the main codebase and performing merges.
Which begs the question: do you just hang on to your fork and work from it indefinitely? and if so, how do you bring changes onto it?
Thankfully, GitHub has some answers here
The crux of this is that you are making another remote for the original source called upstream and repeatedly fetching then merging onto your fork.
So does this mean rebase is banished from the workflow vocabulary? Seemingly so. Or maybe it‘s just there to squash down commits now.
The whole process feels a bit messier when you first imagine that everyone on the team is going to be forking the source, but then you realize that it actually feels a lot more sanitary to have some separation. The real brass ring in this direction, though, is going to be in getting to control the flow of merges and building up more work where multiple parties are collaborating. This still feels a bit like caveman: we hunt together, then we hack off a limb and go and gnaw on it in our corner.
This is the new flow and it‘s a really good one. Strike a victory for tools here. While I have been critical of GH for commercializing the work of others, the other side is that they have quickly demonstrated that a concerted effort between a core tool and some interface tools can make something that‘s been around for over a decade have an appealing zing that it would never have had were it left to its own devices.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)