Skip to content

Contributing

Alper Altuntas edited this page Jun 23, 2017 · 3 revisions

The general workflow of collaborating on this repository is as follows:

  1. Fork NCAR/MOM6-cases repo
  2. Make your changes/fixes
  3. Submit a pull request

1. Fork the repo:

This step is required only once.

  • Go to NCAR/MOM6-cases repository home page: https://github.com/NCAR/MOM6-cases
  • Click the "Fork" button in the top right corner. This will create a new remote repo forked from NCAR/MOM6-cases on your GitHub account.
  • Get a local copy of your remote repo. On a terminal session, type in the following: (Change [YOUR-USER-NAME] in the below command with the github user name that's forked NCAR/MOM6-cases.)
    git clone --recursive https://github.com/[YOUR-USER-NAME]/MOM6-cases.git
    
  • CD to the local copy of your repo
    cd MOM6-cases
    
  • Set NCAR/MOM6-cases as upstream:
    git remote add upstream https://github.com/NCAR/MOM6-cases.git
    

2. Make your changes/fixes

  • Before making changes, run the following commands in your local repo to synch your repo with upstream (NCAR/MOM6-cases):

    git fetch upstream
    git checkout master
    git merge upstream/master
    
  • Make changes in your local repository.

  • Commit and push the changes to your remote repository ([YOUR-USERNAME]/MOM6-cases). For example:

    git add *                      # or, replace * with specific files you want to commit
    git commit -m "Your comment.." # Add a short descriptive comment
    git push                       # Push your changes to your remote repo
    

3. Fork the repo:

  • Go to the GitHub page of your remote repository, and click "Pull requests".
  • On "Pull requests" tab, click "New pull request" button.
  • Review the changes you make, and click "Create pull request" button.
  • The changes you made will be reviewed and tested before being merged into NCAR/MOM6-cases.