noresm:gitbestpractice
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| noresm:gitbestpractice [2015-11-24 09:43:41] – alfg | noresm:gitbestpractice [2017-01-25 08:51:16] (current) – alfg | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| - **Create a github user:** You can create the github user yourself. Go to https:// | - **Create a github user:** You can create the github user yourself. Go to https:// | ||
| - Visit this page: https:// | - Visit this page: https:// | ||
| - | - Send email to alf.grini@met.no | + | - Send email to oyvind.seland@met.no to get the right permissions for the new github user (The email must contain who you are and the github username). |
| - When you have the right permissions, | - When you have the right permissions, | ||
| - git clone https:// | - git clone https:// | ||
| - | |||
| - | **Also do the following: | ||
| - | * **Make sure you have a version of git >= 2.0** (add the line " | ||
| - | * **git config --global push.default simple** (Will edit your ~/ | ||
| The last point will create a new directory called " | The last point will create a new directory called " | ||
| - | If you get error messages, verify that you can open the page https:// | + | If you get error messages, verify that you can open the page https:// |
| - | **More advanced:** To make life easier and avoid typing passwords all the time when contacting the remote (i.e. github), follow the recipe here: https:// | + | **Also do the following on all machines where you use git:** |
| + | * **Make sure you have a version of git >= 2.0** (add the line " | ||
| + | * **git config | ||
| Note that with git, the main branch is no longer called " | Note that with git, the main branch is no longer called " | ||
| Line 43: | Line 41: | ||
| Modify the code (for example a file named myChangedFile.F90) and send back to your local repository through | Modify the code (for example a file named myChangedFile.F90) and send back to your local repository through | ||
| - | < | + | < |
| < | < | ||
| - | The message should link to the issue on github, so if you fix issue number 100 by this code change, you would probably write something like < | + | The message should link to the issue on github, so if you fix issue number 100 by this code change, you would probably write something like < |
| Verify, using the tool " | Verify, using the tool " | ||
| Line 64: | Line 62: | ||
| You can also do (to be completely sure): | You can also do (to be completely sure): | ||
| - | < | + | < |
| ====If you don't understand and want to get back to svn ==== | ====If you don't understand and want to get back to svn ==== | ||
noresm/gitbestpractice.1448358221.txt.gz · Last modified: (external edit)
