GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing azure.github.io — Policies: Repository Branching | Azure SDKs Policies: Repository BranchingThe git branching and workflow strategy we will be using is mostly in line with OneFlow with some slight variations called out below. Main branch
While main will always be in a buildable state it will not necessarily always represent the state of the latest official published packages. To figure out the state of the code for a given released package you need to use the tag for that released package. This rule might vary between the different language repos as some languages that allow direct references to source code (i.e. python, js) like to keep the main branch matching the latest published official package and so you may need to refer to specific instructions in the language repos for the rules. Work should happen in ForksIn order to help reduce the clutter of branches in the main repo as well as to enable a common workflow for both contributors and community members with different permissions people should create forks of the main repository and work in them. Once work is ready in the fork then a pull request can be submitted back to the main repository. See the next few sections for some simple getting started instructions for using forks but for more detailed documentation from github see working-with-forks. Clone forked repoAfter you have created your own fork by clicking the fork button on the main repo you can use the following commands to clone and set up your local repo. After you have ran those commands you should be all setup with your local cloned repo, a remote for your forked repo called origin, and a remote for the main repo called upstream. Sync your local and forked repo with latest changes from the main repoWorking in a fork is highly recommended so you should avoid committing changes directly into main and you can use it to sync your various repos. The instructions in this section assume you are using main as your syncing branch. At this point all three of your repos - local, origin, and upstream - should all match and be in sync. Note that in order to ensure that we don’t accidently get our local or origin main out of sync we use the Creating a branch and pushing it to your forkAfter your local main branch is in-sync with the upstream main you can now create a branch and do work. At this point you should be able to go to the main repository on github and see a link to create a pull request with the changes you pushed. Tip: Some folks like to quickly stage and commit with a simple message at the same time you can use the following command for that. Note that Rebase changes on top of latest mainIf you have changes that you have been working on and you need to update them with the latest changes from main, you should do the following commands after you have sync’ed your local main. Tip: if you want to squash changes you can add the Feature branchesFor isolated work people should create branches off main and keep them in their local or forked repository. The name for these branches is up to the individual working on the changes and doesn’t need to match the If there are a set of people that need to collaborate on the same set of changes before they can go into main then a feature branch can be pushed to the main repository for sharing. Collaborators can either work together to push changes to that branch or submit pull requests against it until it is ready to go to main. Once the feature work is ready the changes should be rebased on top of main and a pull request submitted to the main branch in the main repository. Once the feature work pull request is complete then the branch should be deleted from the main repository. The feature branches pushed to the main repo should be named like Release taggingFor each package we release there will be a unique git tag created that contains the name and the version of the package to mark the commit of the code that produced the package. This tag will be used for servicing via hotfix branches as well as debugging the code for a particular version. Format of the tag should be Note: Our release tags should be considered immutable. Avoid updating or deleting them after they are pushed. If you need to update or delete one for some exceptional case, please contact the engineering system team to discuss options. Release branchesThere are potentially 3 different types of release branches in the order of preference:
In general there should not be a need for release branches because most releases will happen directly from main. In some cases there may be a need to lock down the branch to stabilize a package and in these cases we should create a release branch named There may be other circumstances where we need to release a beta of a package from another branch outside of main or a release branch. In those cases we should use a feature branch in the main repository (note that we should not do stable releases out of feature branches so ensure the version is correctly marked as a beta). The release should be done in the same way, including the creation of the release tag, with the only difference being the release build should point to this feature branch instead of main. When the work is done this feature branch should be merged into main instead of rebased as generally recommended for feature branches. This allows us to preserve the release tags in main after we delete the feature branch. When doing any releases outside of main extra caution needs to be taken to ensure the version numbers are correct and don’t conflict with main or any other branch that might be releasing the same package. Hotfix branchesUnder some circumstances we may need to service a specific version of the code with a hotfix and in these cases we should create a branch with the name After you have the main hotfix branch created you should use your usual workflow (i.e. create another branch or work on the same named branch in your fork) and the changes should be made and the version number incremented based on our versioning guidance for the package. If the fixes are already made in main or another branch you can cherry-pick ( After the changes are merged into the If the changes were not cherry-picked from
Once the hotfix has been released and any changes merged back to |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |