Rob Williams is a probabilistic Lean coder of Java and Objective-C. Rob is a DZone MVB and is not an employee of DZone and has posted 172 posts at DZone. You can read more from them at their website. View Full User Profile

Keeping Forks in Sync

04.27.2011
| 4096 views |
  • submit to reddit

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.

 

From http://www.jroller.com/robwilliams/entry/keeping_forks_in_sync

Published at DZone with permission of Rob Williams, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)