Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
noresm:svnbestpractice [2014-04-09 14:22:29] ingo.bethke@gmail.com [tags] added new example for tag creation |
noresm:svnbestpractice [2022-05-31 09:29:32] (current) |
||
---|---|---|---|
Line 4: | Line 4: | ||
Follow this link to find the tutorial: [[NORESM: | Follow this link to find the tutorial: [[NORESM: | ||
+ | |||
+ | **Note: As of November 13th 2015, NorESM uses git as version control system. The rules and guidelines for merging/ | ||
===== Branches ===== | ===== Branches ===== | ||
Line 18: | Line 20: | ||
Create a branch with (http:// | Create a branch with (http:// | ||
< | < | ||
- | $ svn copy http:// | + | |
| | ||
-m " | -m " | ||
Line 24: | Line 26: | ||
or specifically for the NorESM repository with | or specifically for the NorESM repository with | ||
< | < | ||
- | $ svn copy https:// | + | |
| | ||
-m " | -m " | ||
Line 32: | Line 34: | ||
< | < | ||
svn checkout $BRANCHURL nameOfBranchOnMyPC | svn checkout $BRANCHURL nameOfBranchOnMyPC | ||
+ | </ | ||
+ | |||
+ | |||
+ | In git: First create your new branch locally and then make the remote aware of the new branch like so: | ||
+ | < | ||
+ | git checkout -b my_branch_name | ||
+ | git push -u origin my_branch_name | ||
+ | </ | ||
+ | |||
+ | ..and make sure your .gitconfig-file is configured for doing a merge (for example): | ||
+ | < | ||
+ | [merge] | ||
+ | tool = vimdiff | ||
+ | [diff] | ||
+ | tool = vimdiff | ||
</ | </ | ||
Line 101: | Line 118: | ||
If your code does not pass the tests, you can **not** merge your code back to the trunk | If your code does not pass the tests, you can **not** merge your code back to the trunk | ||
- | Note that in svn, **you can only merge ONE time from your branch to the trunk**, or you risk making a mess of the system! (See http:// | + | Note that in svn, **you can only merge ONE time from your branch to the trunk**, or you risk making a mess of the system! (See http:// |
The merge command (from trunk) will be something like (http:// | The merge command (from trunk) will be something like (http:// | ||
< | < | ||
svn merge --reintegrate $BRANCHURL | svn merge --reintegrate $BRANCHURL | ||
+ | </ | ||
+ | |||
+ | Using git, just use | ||
+ | < | ||
+ | git merge branchNameIWantToMergeWith | ||
</ | </ | ||
===== Tags ===== | ===== Tags ===== | ||
Line 119: | Line 141: | ||
Create the tag with a command like (http:// | Create the tag with a command like (http:// | ||
< | < | ||
- | $ svn copy http:// | + | |
| | ||
-m " | -m " | ||
Line 125: | Line 147: | ||
or specifically for the NorESM repository with | or specifically for the NorESM repository with | ||
< | < | ||
- | $ svn copy https:// | + | |
| | ||
-m " | -m " | ||
Line 133: | Line 155: | ||
You should create a tag in the following cases: | You should create a tag in the following cases: | ||
- | * When you want to create a branch! **Always tag the model first and then create the branch from the tag**. | + | * When you want to create a branch! **Always tag the model first and then create the branch from the tag**. |
* A " | * A " | ||
* A version which has been used for some specific paper (maybe you want to do more runs after referee comments) | * A version which has been used for some specific paper (maybe you want to do more runs after referee comments) | ||
Line 245: | Line 267: | ||
Revision 198 | Revision 198 | ||
- | | + | |
Revision 193 | Revision 193 | ||
- | | + | |
Revision 190 | Revision 190 | ||
+ | |||
+ | | ||
</ | </ | ||