Pretty sure I'm misunderstanding git.
How do I best accomplish this? Initially I was thinking it was with "git push", but I believe that's for remote repositories, and so I'm now wondering what the best practice is to merge the "master" branch to the "production" branch.
Or, am I thinking about the whole thing wrong?
Thanks -- looking forward to putting my Subversion days behind me.
In GitHub Desktop, click Current Branch. Click Choose a branch to merge into BRANCH. Click the branch you want to merge into the current branch, then click Merge BRANCH into BRANCH.
Simply log into the GitLab web app, choose the option to create a GitLab merge request, specify the master branch as the source and the protected branch as the target of the merge. The merge request can be used to have GitLab merge master in a branch that is protected.
(Since I am suppose to share a "wealth of information" ;) ...)
What you are looking at, when talking about master
and production
branches, is a merge workflow.
You can define the workflow you need with any Version Control System tool you want, and in term of development lifecycle management, one of the most complete set of merge workflow set is described in this TFS (Team Foundation Server) set, detailed in its TFS Brancing Guide and illustrated in this question "Servicing Branch in Standard Branch Plan".
Closer to git, git flow is another merging workflow quite popular.
But you are using a DVCS, and its distributed aspect introduces another (orthogonal) workflow: a publication one (your git push -u origin prod
). See "Source Control - Distributed Systems vs. Non Distributed - What's the difference?"
Publication, part of release management, is quite different from merge, part of development.
By merging master
to prod
, you freeze what has been consolidating in development, and mark it as to be released.
By pushing it to GitHub, you start that release process.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With