... | ... | @@ -51,15 +51,13 @@ cd <my-arc-fork> |
|
|
</code></pre>
|
|
|
|
|
|
<h4>L2.</h4>
|
|
|
<p>Add short-name to the remote repos - nordugrid/arc and your fork</p>
|
|
|
<p>Add short-name to the remote upstream repo nordugrid/arc</p>
|
|
|
<pre><code>git remote add upstream https://source.coderefinery.org/nordugrid/arc.git
|
|
|
git remote -v
|
|
|
#If no origin is added (should be by default) do
|
|
|
git remote add origin https://source.coderefinery.org:<your-username>/arc.git
|
|
|
</code></pre>
|
|
|
|
|
|
<h4>L3.</h4>
|
|
|
<p>Fetch all the main branches from your forks remote repo to your forks local repo</p>
|
|
|
<p>Fetch the important stable branches from your forks remote repo to your forks local repo</p>
|
|
|
(actually only one now, but keeping for-loop just for the handiness of easily adding more branches, for instances dev-branches) - here the "next" branch is shown as an example.
|
|
|
<pre><code>cd <my-arc-fork>
|
|
|
for remote_branch in origin/next; do local="$(cut -d'/' -f2 <<<"$remote_branch")" && git checkout -b $local --track $remote_branch; done; git checkout master;
|
... | ... | @@ -69,8 +67,6 @@ for remote_branch in origin/next; do local="$(cut -d'/' -f2 <<<&qu |
|
|
# Everyday workflow/development
|
|
|
|
|
|
|
|
|
Currently master holds all commits relevant for releases in the ARC 6 release series. The "next" branch is created when needed, and holds the same commits in addition to commits that are backward incompatible to ARC 6 and therefore will go into the next major release: ARC 7.
|
|
|
|
|
|
#### D1.
|
|
|
Before you start a development branch on your fork, update your forks branches with the upstream branches. Below shows how to do this for the master and next branch.
|
|
|
|
... | ... | @@ -94,10 +90,10 @@ git push -u origin <my-dev-branch> |
|
|
```
|
|
|
|
|
|
|
|
|
#### D3.
|
|
|
#### D3. optional
|
|
|
Keeping your development branch up to date.
|
|
|
|
|
|
If you don't need to, it is simplest (and cleanest) to not update your development branch. This will avoid extra merge commits on your dev branch.
|
|
|
*If you don't need to, it is simplest (and cleanest) to not update your development branch. This will avoid extra merge commits on your dev branch.*
|
|
|
|
|
|
However, if you need to (e.g. to include some relevant code from the upstream parent branch), this is how to:
|
|
|
|
... | ... | @@ -106,7 +102,7 @@ However, if you need to (e.g. to include some relevant code from the upstream pa |
|
|
current_branch=$(git rev-parse --abbrev-ref HEAD); for branch in master next; do git checkout $branch && git pull upstream $branch;git push -u origin $branch; git checkout $current_branch; done;
|
|
|
```
|
|
|
|
|
|
2. update your development branch
|
|
|
2. update your forks development branch with the now updated forks parent branch
|
|
|
```
|
|
|
git checkout <my-dev-branch>
|
|
|
git merge --no-ff <parent-branch>
|
... | ... | @@ -143,10 +139,10 @@ Repeat steps dev1, dev3, dev4 as needed depending on how long a time-period your |
|
|
- Use the link you get when you push the commits to the dev-branch on your fork to create a MR. **NB you must then manually press the "Change branches" link** as the suggested default target branch is in your fork. You want to use the upstream repo (nordugrid/arc) as the target project.
|
|
|
- Or go to `https://source.coderefinery.org/<your-user-name>/arc/merge_requests/new`
|
|
|
- Or navigate from your fork Merge Requests -> New Merge Request
|
|
|
* Source branch: `<your-user-name>/arc <your-dev-branch>`
|
|
|
* Target branch: `nordugrid/arc <target-branch>` (See [table of rules](/contributing/cheat-sheet#rule-table) for choosing correct target)
|
|
|
* Source branch: `<your-user-name>/arc <your-dev-branch>`
|
|
|
* Target branch: `nordugrid/arc <target-branch>` (See [table of rules](/contributing/cheat-sheet#rule-table) for choosing correct target branch)
|
|
|
* Once the MR is created, select the *MergeRequest* template from the Description box drop-down menu and follow instructions in the template.
|
|
|
* Add labels [see more about labels])/contributing/overview#labeling-issues-and-merge-requests]
|
|
|
* Add labels [see more about labels](/contributing/overview#labeling-issues-and-merge-requests)
|
|
|
* If the changes are also for another branch (typically `next`) tell arcbot to automatically create a MR.
|
|
|
* Add the label `cherrypick:<other-branch>` (See [table of rules](/contributing/cheat-sheet#rule-table) for choosing correct label)
|
|
|
* Find more details about [nordugrid-arc-bot here](/contributing/about-arcbot).
|
... | ... | |