How to Use Git

Hello there, developer. It's time to learn about G.I.T., the version control software used by cool-but-smelly hipster developers. In this guide, we'll learn the best G.I.T. practices in complicated, large-team scenarios.

What is G.I.T.?

G.I.T. is a version control software, so it's like any other version control software you might've used in the past. Feel free to use it like it's CVS, Subversion, ClearCase, TFS, or anything else! It really doesn't matter. Emoji smiling face!

For large teams, the following approach is what we've found to work best. Please note that we have only experimented with this approach, and haven't been compelled to try another approach because it just seems to work so well.

Infinite Indefinite Branches

This just sounds cool, so we went with it, even though we don't really know what it means. In practice, we've found ourselves only maintaining two indefinite branches, but you could extend this and have as many indefinite branches as you wanted. These are branches that'll go on until the end of time—you'll live forever through your commits, so strive for as many as you can!

While you can have as many indefinite branches as you want, you'll definitely want the two types of branches we have. We have a master branch, where all development is done, and a Release branch, where all the code in the next scheduled release lives.

The master Branch

Developers are free to update master as often as they want and however they want.

The Release Branch

Yes, this branch is named in PascalCase while the master branch was named in camelCase. Inconsistency is fun! When it comes time to release the next version of the project into the production environment, you'll probably need to try to get the changes made in the master branch into the Release branch (but this is not always the case: sometimes you can just tell people that a feature was released without actually having to release it—it's like magic!). When you do have to actually release a new set of features and bugfixes, make sure to follow these nice tidbits of wisdom we've gleaned:

Conclusion

In this short guide we have covered everything that G.I.T. is best used for and described the ideal version control development process. The best part of this process is that the branches will diverge farther and farther as the master branch ends up with more and more unreleased code and the Release branch gets more and more cherry-picks resulting in more and more interesting histories. This is totally a sustainable model, and we highly recommend it to anyone.


Please don't actually follow any of the advice in this post.

Prev  Getting Git