Git Flow model based on Sourcetree

Source: Internet
Author: User
Tags sourcetree

Git Flow model based on Sourcetree

1. Sourcetree is an open source Git graphics management tool that can download Mac version, Windows version

2. Git Flow is a set of behavior specifications and a tool for simplifying some git operations when using Git for source control.

Basic Operating Procedures

1. First create a local git project with Sourcetree, Xxxproject,

2. Submit a commit once in the project and submit it to the master branch by default;

3. Then in the upper right corner of the Sourcetree tool, click Gitflow to open the GIT Flow specification model development

For example, after opening gitflow;

Production Environment Branch use: Master

Development Branch Use: Develop

When new additions are required, when the build is released, a patch is created to fix the bug, respectively, with the corresponding feature,release,hotfix prefix such as the branch

Thus in the project development process, the Management Project branch becomes very normative;

4: After opening, our project is back to the develop branch, the development of the future is on this branch; When development completes some modules, you can go back to master branch merge

5. To add a new feature using Gitflow, click the Git Flow button in the top right corner of Sourcetree and the menu will appear, select Create new feature

The new feature name is output, and the new feature is developed by default on the new feature branch;

After the new feature development is completed, click the Git Flow button again and the new function will appear, the button

Click, complete the new function, will merge the current new features into the develop branch, and delete the new feature branch

6: Use git flow to publish a new version, also click on the Git Flow button, menu choose to create a new release version,

On the release version branch, after completing the project Release configuration, submit, and then click the Git Flow button, the complete release button will pop up, click,

After confirming, you will find that the branch of the release version is merged into the develop branch and the master branch, indicating that a version is released on the production

7: New patch with Git flow to fix bugs

For example, a version of the above published in the production of the time, there is a bug, then, click on the Git Flow menu, choose to create a new repair patch

At this point, the bug Repair branch, is based on the master, after fixing the bug, click Git flow popup again, complete the patch repair

Once determined, the newly fixed bug branch will be merged into the master branch and the develop branch.

8: Finally, let's take a look at the current git commit status after creating the project-opening gitflow---Adding new features---Releasing a new version---fixing the bug.

GIT's powerful branch management and git flow model, the project's Code management development, so clear.

Git Flow model based on Sourcetree

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.