Operations 10 min read

Designing Effective Git Branch Strategies with Huawei Cloud DevCloud for DevOps Teams

This article explains how to use Git and Huawei Cloud DevCloud to implement development, test, and production branch strategies, manage permissions with protected branches, handle merge conflicts, and leverage merge requests and code reviews to improve DevOps efficiency.

DevOps
DevOps
DevOps
Designing Effective Git Branch Strategies with Huawei Cloud DevCloud for DevOps Teams

Xu Lei emphasizes that demand management, configuration management, and version management are the three pillars of R&D management, and that Git is the industry‑standard version control system, making branch strategy knowledge essential for developers.

Using Huawei Cloud DevCloud (https://devcloud.huaweicloud.com/) as an example, the article introduces common development scenarios and shows how to design and apply suitable Git branch strategies for a development team.

The concepts of development library, controlled library, and product library originate from CMMI and describe where developers modify code, where test versions are stored, and where released versions reside.

With Git, three branches— dev , test , and prod —can represent these libraries without creating separate repositories; protected branches in DevCloud enforce permission control so that only administrators can commit or merge to test and prod .

Note: the "protected branch" merge permission in DevCloud refers to merge‑request approval, not the git merge command.

Because multiple developers work on the dev branch, merge conflicts are inevitable; regularly pulling the latest dev changes before pushing helps reduce conflicts.

To keep test and prod clean, teams can use --squash when merging from dev or test , optionally tagging releases; however, squashing hides the branch relationship in the graph, so tags are recommended.

$ git checkout dev
Switched to a new branch 'dev'
Branch 'dev' set up to track remote branch 'dev' from 'origin'.
$ git checkout test
Switched to branch 'test'
Your branch is up to date with 'origin/test'.
$ git merge dev --squash --strategy-option=theirs
Auto-merging README.md
Automatic merge went well; stopped before committing as requested
Squash commit -- not updating HEAD
$ git commit -m "test-v2"
[test 8d9b6a4] test-v2
1 file changed, 5 insertions(+)
$ git log --oneline --graph
* 8d9b6a4 (HEAD -> test) test-v2
* 0e9357a test-v1
* d226468 init
$ git push
...
remote: To create a merge request for test, visit:
remote:   https://codehub.devcloud.huaweicloud.com/codehub/nnnnnn/newmerge
...

If developers are not comfortable with complex command‑line options, using DevCloud's merge‑request feature is simpler; the UI guides users through creating, reviewing, and merging requests.

Reviewed Commits, as described by Martin Fowler, can be combined with feature branches: a developer creates a feature branch from dev , pushes it, opens a merge request, reviewers comment, and after approval a privileged user merges and optionally deletes the source branch, a workflow well supported by DevCloud.

The article concludes with a reminder that the discussion continues in subsequent sections and mentions an upcoming IDCF "Winter Talk" event featuring DevOps practices in the financial industry.

configuration managementDevOpsgitMerge RequestBranch StrategyDevCloud
DevOps
Written by

DevOps

Share premium content and events on trends, applications, and practices in development efficiency, AI and related technologies. The IDCF International DevOps Coach Federation trains end‑to‑end development‑efficiency talent, linking high‑performance organizations and individuals to achieve excellence.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.