Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jklymak
Last active September 24, 2021 12:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jklymak/28f6f8f97d8f4d7c42277b56e488ced5 to your computer and use it in GitHub Desktop.
Save jklymak/28f6f8f97d8f4d7c42277b56e488ced5 to your computer and use it in GitHub Desktop.

#MITgcm checkin runs

Sometimes we want to store versions of config files for a model run. This uses runname to make a new branch, and to make a commit on the main branch. You need to set the model config up to be tracked, of course.

_log.info('doing this via git!!')

os.system(f'git commit -a -m "gendata for {runname}"')
os.system('git push origin main')
os.system(f'git checkout -B {runname}')
os.system(f'git push origin {runname}')
os.system('git checkout main')

Here is an approrpiate .gitignore:

results
build
archive
reduceddata
slurm*.out
**/__pycache__
.tramp_history
.ipynb_checkpoints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment