In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces "how to use Git Flow". In daily operation, I believe many people have doubts about how to use Git Flow. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "how to use Git Flow"! Next, please follow the editor to study!
Common branches of Git Flow-master branches
The master branch is the code recently released to the production environment, that is, the recently released release,master branch can only be merged from other branches, can not be directly modified in this branch, all commit on the master branch should be marked with tag, for example, merging release to master should create a tag.
Develop branch
This branch is our main development branch, which contains all the code to be released to the next release, mainly receiving mergers of other branches, such as the feature branch.
Feature branch
This branch is mainly used to develop a new function. Once the development is complete, we merge back to the develop branch and move on to the next release, and the original feature branch is deleted.
Release branch
When you need to release a new release, create a release branch based on the develop branch, you can test on this release, change the Bug;, while other developers can continue to create a new feature based on the develop branch. After completing the release, merge it into the master and develop branches. Typically, when the release branch is published, it will be deleted, and a tag will be created to remember the release version number, and then the release will be deleted.
Hotfix branch
When we find a new Bug in master, we need to create a hotfix. After completing the hotfix, we merge back to the master and develop branches, and type a tag on the master, and the hotfix changes will automatically go to the next release.
Git Flow command example create developgit branch developgit push-u origin develop start feature# create new feaeure branch git checkout-b feature/func develop# via develop push to remote server: git push-u origin feature/func# suppose the file git statusgit add .git commit is modified to complete featuregit checkout developgit pull origin develop#--no-ff: merge without fast-forward, keep commit history of branches #-- squash: merge using squash Compress the commit history of multiple branches to a single git merge-- no-ff feature/funcgit push origin developgit branch-d some-feature# if you need to delete a remote feature branch: git push origin-- delete feature/func starts releasegit checkout-b release/1.0.0 develop to complete releasegit checkout mastergit merge-- no-ff release/1.0.0git pushgit checkout developgit merge-- no-ff release/1.0.0git pushgit branch-d release/1.0.0git push origin-- delete release / 1.0.0 # after merging master/devlop branches Type tag git tag-a 1.0.0 mastergit push-- tags start hotfixgit checkout mastergit merge-- no-ff hotfix/1.0.1git pushgit checkout developgit merge-- no-ff hotfix/1.0.1git pushgit branch-d hotfix/1.0.1git push origin-- delete hotfix/1.0.1git tag-a 1.0.1 mastergit push-- tags here, the study on "how to use Git Flow" is over. I hope you can solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.