noresm:gitbestpractice

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
noresm:gitbestpractice [2015-11-24 12:56:57]
alfg
noresm:gitbestpractice [2022-05-31 09:29:32] (current)
Line 4: Line 4:
   - **Create a github user:** You can create the github user yourself. Go to https://github.com/join and create a user (Make user-name which is easy to understand, for example FirstnameLastname. You can attach several email-addresses to the same user.)   - **Create a github user:** You can create the github user yourself. Go to https://github.com/join and create a user (Make user-name which is easy to understand, for example FirstnameLastname. You can attach several email-addresses to the same user.)
   - Visit this page: https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup   - Visit this page: https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup
-  - Send email to alf.grini@met.no (with a copy to trond.iversen@met.no) to get the right permissions for the new github user (The email must contain who you are and the github username).+  - 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, you can obtain the code.   - When you have the right permissions, you can obtain the code.
   - git clone https://githubUserName@github.com/metno/noresm.git    - git clone https://githubUserName@github.com/metno/noresm.git 
Line 41: 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
-<file>git add myCHangedFile.F90 </file>+<file>git add myChangedFile.F90 </file>
 <file>git commit -m "aMessage" </file> <file>git commit -m "aMessage" </file>
  
-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 <file>git commit -am "Did part of the work to resolve #100" </file>+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 <file>git commit -am "Did part of the work to resolve metno/noresm#100" </file>
  
 Verify, using the tool "gitk" that the changes make sense. Verify, using the tool "gitk" that the changes make sense.
Line 62: Line 62:
  
 You can also do (to be completely sure): You can also do (to be completely sure):
-<file>git push remoteName myLocalBranchName:remoteBranchName </file> which if your are changing the master-branch would translate to <file>git push origin master:master </file> (The above command means push my changes to the remote named "origin" from my local branch named master to the remote branch named master. If you are changing another branch than master, you must obviously not write "master".+<file>git push remoteName myLocalBranchName:remoteBranchName </file> which if your are changing the master-branch would translate to <file>git push origin master:master </file> (The above command means push my changes to the remote named "origin" from my local branch named master to the remote branch named master. If you are changing another branch than master, you must obviously not write "master".)
  
 ====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.1448369817.txt.gz
  • Last modified: 2022-05-31 09:23:24
  • (external edit)