We are excited to announce the release Git Town! Git Town is an open source command-line tool that helps keep software development productive as project and team sizes scale. It provides a few additional high-level Git commands. Each command implements a typical step in common software development workflows.
Check out the screencast to get an overview of what these extra Git commands are and how to use them.
The problem: Software development doesn’t scale well
Many software team runs into a few typical scalability issues:
- More developers means more frequent commits to the main branch. This makes feature branches outdate faster, which results in bigger, uglier merge conflicts when finally getting the LGTM and merging these feature branches into the main branch. Time spent resolving merge conflicts isn’t spent writing new features.
- These merge conflicts increase the likelihood of breaking the main development branch. A broken main branch affects the productivity of the whole team.
- Old branches are often not deleted and accumulate, making it harder to maintain an overview of where current development is happening, and where unmerged changes are.
These are only a few of the many headaches that diminish developer productivity and happiness as development teams grow. These issues are almost completely independent of the particular workflows and how/where the code is hosted.
The approach: Developer discipline
Fortunately, most of these issues can be addressed with more discipline:
- Always update your local Git repo before cutting a new feature branch.
- Synchronize all your feature branches several times per day with ongoing development from the rest of the team. This keeps merge conflicts small and easily resolvable.
- Before merging a finished feature branch into the main development branch, update the main development branch and merge it into your feature branch. Doing so allows you to resolve any merge conflicts on the feature branch, and tests things before merging into the main branch. This keeps the main branch green.
- Always remove all Git branches once you are done with them, from both your local machine as well as the shared team repository.
The solution: A tool that goes the extra mile for you
It is difficult to follow these practices consistently, because Git is an intentionally generic and low-level tool, designed to support many different ways of using it equally well. Git is a really wonderful foundation for robust and flexible source code management, but it does not provide direct high-level support for collaborative software development workflows. Using this low-level tool for high-level development workflows will therefore always be cumbersome and inefficient. For example:
- creating a new, up-to-date feature branch in the middle of active development requires up to 6 individual Git commands.
- updating a feature branch with the latest changes on the main branch requires up to 10 Git commands, even if there are no merge conflicts
- properly merging a finished feature branch into the main development branch after getting the LGTM in the middle of working on something else requires up to 15 Git commands.
Keeping feature branches small and focused means more feature branches. Running all these commands on each feature branch every day easily leads to each developer having to run a ceremony of hundreds of Git commands each day!
While there are a number of tools like Git Flow that focus on supporting a particular Git branching model, there is currently no natural extension of the Git philosophy towards generic, robust, high-level teamwork support.
We are excited to release exactly that today: Git Town! It provides a number of additional high-level Git commands. Each command implements a typical step in most common team-based software development workflows (creating, synching, and shipping branches). Designed to be a natural extension to Git, Git Town feels as generic and powerful as Git, and supports many different ways of using it equally well. The screencast gives an overview of the different commands, and our tutorial a broader usage scenario.
The awesomeness: Made for everybody, as Open Source
Git Town is for beginners and experts alike. If you are new to Git, and just want it to stay out of your way and manage your code, let Git Town provide the Git expertise and do the legwork for you. If, on the other hand, you are a Git ninja, and want to use it in the most effective manner possible, let Git Town automate the repetitive parts of what you would type over and over, with no impact on your conventions, workflow, and ability to do things manually.
Git Town is open source, runs everywhere Git runs (it’s written in Bash), is configurable, robust, well documented, well tested, has proven itself on everything from small open source projects to large enterprise code bases here at Originate, and has an active and friendly developer community.
Does this force me into any conventions for my branches or commits?
Not at all. Git Town doesn’t require or enforce any particular naming convention or branch setup, and works with a wide variety of Git branching models and workflows.
Which Git branching models are supported by Git Town? Git Town is so generic that it supports all the branching models that we are aware of, for example GitHub Flow, GitLab Flow, Git Flow, and even committing straight into the master branch.
How is this different from Git Flow?
Git Flow is a Git extension that provides specific and opinionated support for the powerful Git branching model with the same name. It doesn’t care too much about how you keep your work in sync with the rest of the team.
Git Town doesn’t care much about which branching model you use. It makes you and your team more productive by keeping things in sync, and it keeps your Git repo clean.
It is possible (and encouraged) to use the two tools together.
Is it compatible with my other Git tools?
Yes, we try to be good citizens. If you run into any issues with your setup, please let us know!