git branching model


git is a tool for the command line to backup and distribute source code. There are multiple beautifully made webpages and GUI tools which help to use it and to make sense out even out of the biggest code bases.

The workflow is simple: Each code base / each project is in its own repository. As soon as you’ve finished a change or a feature you commit (save) your code. You can switch back and forth between commits and can compare the changes you’ve made. If you want to share or backup your repository, you push (upload) it to a git hoster. Other participants in your project can pull (download) your repository, including all commits you’ve made. One repository can have multiple branches (versions of your code), each of those has its own commits. Branches can be merged (united) and created.

As a hoster for git I can recommend github which is perfect for open source projects, and gitlab if you need a lot of private repositories. Both services are free, at the time of writing github has some more useful features (like project management with Kanban) compared to gitlab, but both services do a very good job with hosting and helping you make sense out of large repositories.

As committing, pulling, pushing may be complicated for new users I recommend a GUI application to do those steps for you, until you feel confident to use the command line. One of the best is gitkraken, github even provides its own desktop client.

Git is very handy as a backup tool, but it can also help you to structure different versions of your code, allows you to do code reviews and to allow statistics about the overall progress of the repository.

Branching may be confusing for new users, but if integrated in your workflow in a sensible way it is a very handy tool to allow work on different features and versions of your software in a sensible way. How to name and organize your branches is explained very well in a tutorial on the webpage from atlassian.
Another very well written (but a bit more technical) post to branching concepts can be found on the blog of nvie

Leave a Reply

Your email address will not be published. Required fields are marked *