There are three types of supporting branches that sit alongside the two core ones. Which leads us quite nicely on to the three types of supporting branches. It’s easiest to think of the develop branch as a collection of all the features that are ready for the next release.Īny new features that are going to be added should be branched from develop, not from the master. If using continuous delivery pipelines, you can trigger production releases every time a commit is made to master. Production releases are only made from the master branch, which keeps it perfectly aligned with any code that is currently in a live environment. The master branch should always be production-ready.Īlways keep the master branch exactly mirroring the state of the current live system There are two branches, that have an infinite lifetime. The strategy for when and how a branch should be created is quite straightforward. Once a developer is finished working on a feature, it is pushed back to the master branch. Developers also may need to pull changes from other developers branches (if multiple people are working on the same feature for example). In most cases, and for the remainder of this post, that will be master.įrom there, developers pull and push their changes to the master branch. The general idea is that there is one central ‘truth’ repo. GitFlow is a workflow design first proposed by Vincent Driessen at nvie. Whilst this is ok, it does get a little tedious sometimes. Git checkout -b my-new-branch git add \"mynewfile.txt\" git commit -m \"Add mynewfile\" git checkout master git merge my-new-branch Previously, I was using commands like this: Git Flow changed my life as far as the management of a repository goes. I’d used branching and merging in the past, but it had been a very manual process. If you missed part one of my series of articles on branching, merging and the general organization of git repositories you can find it here An Introduction To Git Flow
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |