7/31/2023 0 Comments Sourcetree git flowThe only difference is the originating branch which was master in this case. 'develop', 'master' and tags have been pushed to 'origin'Īs we can see the process is very similar to release. Hotfix branch 'hotfix/1.0-hotfix-1' has been locally deleted Hotfix tag '1.0-hotfix-1' has been back-merged into 'develop' Hotfix branch 'hotfix/1.0-hotfix-1' has been merged into 'master' If we switch to detail view in Sourcetree output we can see a nice summary of actions that took place: We can choose to push to the origin directly too. Once we are ready to ship this release, we end the release similarly: Now let’s assume we’ve implemented all the features planned for this release and we want to deploy a new version of our application. It doesn’t push to remote so we have to push it ourselves. Similar to start, I went to Repository -> Git Flow -> Hg Flow -> Finish FeatureĪs the options in the window suggests, this action merges the changes into develop and deletes the local branch. Now that the feature has been implemented, I want to finish the feature. I just added a blank file that represents the changes required for that feature and commmited my changes. Let’s start with a new feature named “users” It also created the local develop branch.Īt this point we have the three types of branches explained above to choose from to start. It shows a dialog box to configure the plugin: It sounds confusing at first because the git repo itself is already initialized. Initialization and working with featuresįirst thing to do with Git Flow in SourceTree is to initialize the repository. I’ve already created it in GitHub and in my development environment. In this example I’m going to use a GitHub repository called gitflow-automation-test. In the example below I will use SourceTree which is available in Windows and Mac. Most tools have plugins to support Git Flow. Hotfix master develop and master hotfix-* preparation of the release Similar to release in that used to prepare a production release but unplanned. Adding large new features here is strictly prohibited. Release develop develop and master release-* preparation of the release Starts after feature-freeze. Hotfix branches Supporting branch May branch off Must merge back into Naming convention Lifetime Remarks Feature develop develop anything except master, develop, release-*, or hotfix-* as long as the feature is in development Features should never interact directly with master.There are also supporting branches with limited lifetime such as:.When the source code in the develop branch reaches a stable point and is ready to be released, all of the changes should be merged back into master somehow and then tagged with a release number.origin/develop is the main branch where the source code of HEAD always reflects a state with the latest delivered development changes for the next release (also called as integration branch).origin/master is the main branch where the source code of HEAD always reflects a production-ready state.The central repo holds two main branches with an infinite lifetime: In this post I woud like to talk about a common Git branching strategy: Git Flow.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |