![]() The more often you update your feature branch with any changes form the develop branch, the less likely there are to be conflicts when you come to merge the feature back into develop. ![]() This will create a feature branch from the develop branch (it doesn't matter which branch you are currently on when you select this command). ![]() To create a feature branch, use use the Start Feature option. As a reminder of the GitFlow process, SmartGit prompts you if you forget which branch you are on and try to commit any changes on the master branch. Starting and finishing a featureįollowing GitFlow, to start work on a feature, bug fix or other work item, you create a feature branch. For example, you might have a convention of adding the application's initials.Ĭonfiguring the repository for 'full' GitFlow as shown above creates master and develop branches if they don't exist, and adds the following lines repository's git.config file:īecause the git.config file is a Git management file which isn't usually included in the repository itself, GitFlow installation is on a per machine basis – each member of the team will have to configure their local repository to use GitFlow, if they want to do so. In the version tags field, you can any any text that you want to be prefixed to the version tags for releases. I pick the simple version if I'm just dipping into a project to help out with a feature, the full version otherwise. If develop and master branches already exist in the repository, they will be detected and selected as the master and develop branches for GitFlow. You can also alter the standard branch names here, if you have a particular reason for wanting to. If the repository hasn't been configured to use GitFlow, this will be the only available option at this stage.Īt this point you can choose whether to have a 'light' version of GitFlow, which just has a master branch, develop branch and feature branches, or a full version with hotfixes and releases as well. If a repository isn't already configured to use GitFlow, first off, you can configure it using SmartGit > GitFlow > Configure. The SmartGit client also has some useful tools for following the GitFlow workflow, which I'll walk through in this blog. You can install GitFlow on your machine and use it with command line tools for Git. The upshot of using GitFlow from a developer point of view is that almost all of your development happens on feature branches (or hotfix branches if something urgent crops up). ![]() There's a more detailed description of the branch structure and work flow in part 2 of Howard's GitFlow with Team City series. Master is reserved for the latest released version of the codebase, with the release branches acting as gatekeeper between develop and master. The workflow between branches is shown in the visualisation below, where circles represent commits, and arrows merges.Įvery change made to the code base during development cycles (unless it's on a feature branch for a work item you decide isn't needed) ends up in develop. Hotfix/ - branches for dealing with urgent fixes, which get merged into master (and develop) and then a new release branch when complete.Feature/ - each feature branch corresponds to work on a particular area (e.g.Develop - a permanent branch containing the work-in-progress version of the site, with feature branches being created from this branch and merged back into it.Master - a permanent branch acting as a definitive record of the latest released version of the application.Release/ - each release branch corresponds to a released version of the application.The purpose of a branch and its position in the workflow, from development to release, is indicated by its name: GitFlow specifies a standard branch structure and workflow for moving changes between branches, which standardise the way a team uses Git, and keep the repository clean and structured, with important branches protected from ad hoc changes. This blog explains how you can use the Git client SmartGit to follow the GitFlow model, which Howard described in his series a step by Step Guide to using GitFlow with TeamCity. By Alice Waddicor Software Engineering Apprentice III 29th January 2015
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |