Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
The last set of advanced features we're going to cover are called forward integration and reverse integration. These are a process that you use with branching and merging. Consider you might have a product, as we talked about before, but it has two separate features that can be worked on by two different developers independently. If these two different features interact, as your developers each work in their private branch, they may want to from time to time check their changes into the main branch so the other developer can get them, and they may also want to get changes from the main branch back into their private branch to continue working.
So let's take a look and see how that works. So we start out with our main branch, and we create two separate branches, one for each developer, feature 1 branch, and feature 2 branch. Initially, they both contain the same set of information that's in the main branch, and now they begin to diverge individually. In the feature 1 branch, developer number one adds feature D and then decides because developer number 2 may need to be able to use feature D, they check it back into the main branch in a process that's called reverse integration. Now, the reason this is more than just a merge is that the first developer is going to continue to work in their feature 1 branch as opposed to moving back to the main branch.
Now, developer number two continues to work in their own private branch here in feature 2 branch and adds feature E. When they're done, they check that in, again, through another process called reverse integration. In order for developer 1 to continue to keep working in their private branch and yet still take advantage of the code for feature E, they go through a process called forward integration, which allows them to take changes from the main branch and put them back into their private branch. Now, this is slightly different than creating just a new branch.
Similarly, developer number 2 might do a forward integration back into their private branch in order to pick up feature D. In the end, when you get to the final point where the product is shipped, feature 2 branch, feature 1 branch, and the main branch all have exactly the same code, because they've all been integrated together through a series of reverse integrations and forward integrations. What's interesting about this is when you look at really, really large development projects, this is the way they work. For example, inside Microsoft, Windows is done this way, Visual Studio is done this way.
In Visual Studio there are teams of hundreds of developers. One team works on Visual Basic, one team works on Visual C#, one team works on the Editor, another team works on the XAML visual designer, and all of those teams work independently, going through numerous forward and reverse integrations over the course of creating a new version of Visual Studio, only to end up with all of the teams having their branches be equal to the final shipping product.
Get unlimited access to all courses for just $25/month.Become a member