Git philosophy: how to get a "leading" branch into a "production" branch?

Pretty sure I misunderstand git.

My goal

  • I have a private repo on github with a "leading" branch.
  • I would also like to have a production branch, which I will click on all my changes from the wizard.
  • Then I would like to connect it to Azure and tell Azure to automatically deploy from the production branch.

Question

How am I best to do this? Initially, I thought it was with "git push", but I think for remote repositories, and so now I am wondering what is the best way to merge the "leading" branch into the "production" branch.

Or, I think, is all this wrong?

Thanks, I look forward to when my Subversion days are left behind.

+6
source share
3 answers

(Since I can share the "wealth of information";) ...)

What you are looking at when talking about the master and production branches is a merge workflow .

You can define the workflow that you need with any version control tool you need, and from the point of view of development life cycle management, one of the most complete sets of working parameters for federation is described in this TFS (Team Foundation Server) set, detailed in "TFS Brancing Guide and illustrated in this issue Service in a standard industry plan ."
Closer to git, git flow is a fairly popular merge process.

But you are using DVCS, and its distributed aspect introduces another (orthogonal) workflow: publishing (your git push -u origin prod ). See " Source Control" - Distributed Systems or Distributed - What is the Difference?

Publishing, part of release management, is very different from merging, part of development.
By combining master to prod , you freeze what was consolidated in development and mark it as released.
By clicking it on GitHub, you begin this release process.

+2
source

When your lead branch is ready to run, you merge it into a production branch, and then paste that production branch into the github repository.

+2
source

I would advise you to take a look at the git pages for branching workflows to establish a repository management plan. In addition, Von C shares a wealth of information on the git ecosystem. Viewing his answers can be very helpful. This post is also very useful for tracking remote branches.

+2
source

All Articles