Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Committing CESM cases to Git

dstiller

New Member
Hi,

I would like to commit my CESM cases to Git for versioning and as backup. However, there are a lot of auto-generated files (logs, timing, Buildconf) in a case directory, which are ideally not committed.

Is there a recommended practice for committing case directories? Or a standard .gitignore?

Thanks,
Dominik
 

jedwards

CSEG and Liaisons
Staff member
Hi Dominik,

I have this on my list of things to do prior to the cesm3.0 release but I haven't started it yet. I think that you could put into a .gitignore everything that is a link from the case directory back to the source tree. Buildconf can be added but I would think you want to keep the logs and timing files. As I said I have a plan to make it a part of the cesm3 release to automatically create a git repo and keep it up to date as the case evolves - I think you could do a git commit each time the CaseStatus file is written to. If you want to take this on before that time, great - perhaps I can learn from your experience.
 

dstiller

New Member
Glad to hear you are working on this for CESM3, especially with the auto-committing. I think the files to be ignored depend on the purpose of using Git for cases. If we want to use Git to locally keep track of changes for the case owner, then ignoring the linked tools and committing log/timing files makes sense. However, if we want to use Git to share cases with others so that they can run them on their own, then links should maybe be committed and log/timing files ignored. But maybe the second scenario also requires create_clone to adjust the tool links.

I'm using it for the first scenario for now, and I only want timing but not log files committed. Here's my gitignore:
Code:
# Linked CIME tools
archive_metadata
case.build
case.cmpgen_namelists
case.qstatus
case.setup
case.submit
check_case
check_input_data
pelayout
preview_namelists
preview_run
xmlchange
xmlquery

# Auto-generated files
Buildconf/
CaseDocs/
logs/
run.*
st_archive.*
 
Top