To fix a bug or add a feature:

Make a new branch to work on:

  git checkout -b new_branch_name

Make changes there.  Add and commit them to my local repo:

  git add new_files changed_files
  git commit

To revert changed files to the original contents:

  git restore file

As others update code on the public repo, issue this command to keep my local repo in sync with the public version:

  git checkout main
  git pull
  git checkout new_branch_name
  git merge main

The first time you push your branch changes to the public server:

 git push -u origin new_branch_name

After that, anytime you want to copy your local changes to github:

  git push 

When the changes are ready for review and merging into the public repo:

Go to github on the web and start a pull request by clicking on the 'create pull request' button.

The next bit happens on github - reviews, change requests, etc.

If changes are needed, make them on your local repo and push them again to github.

After the pull request is merged and/or closed:

When done with the pull request:

  git fetch --prune origin

will clear out any references to remote branches that don't exist anymore.  

Delete your local version of your branch:

  git branch -d new_branch_name

If it complains about the existance of untracked files, remove them with:

  git clean -d -f

The first time, made a local copy of the repo:

On your own machine clone the public DART repo:

  git clone https://github.com/NCAR/DART.git dart

or if you have ssh access set up:

  git clone git@github.com:NCAR/DART.git dart

Then:

  cd dart
  git checkout main

Run these to check:

  git status
  git remote -v

Status will print the currently checked out branch.
Origin for fetch and push should both list the public DART repo.

Advanced:

http access will prompt you for your github name and password every time you push.  

Instead, set up ssh access to git.  google how to generate an ssh key and add it to git
(details beyond this simple guide).

Then clone this instead:
 
    git clone git@github.com:NCAR/DART.git dart

If you have an existing http repo you want to change to ssh access method, cd into it and:

  git remote set-url origin git@github.com:NCAR/DART.git