ACCESS-NRI / accessdev-Trac-archive

Archive accessdev Trac contents as issues
Apache License 2.0
0 stars 0 forks source link

Use specific revisions for builds #356

Open penguian opened 6 years ago

penguian commented 6 years ago

| by mrd599@nci.org.au


At the moment, many (all?) suites simply use the head revision for MOM and CICE. E.g.

git clone https://github.com/peterdobro/mom.git

svn co https://access-svn.nci.org.au/svn/cice/branches/access/cice_GC3_GA7 

To ensure reproducibility we should always use specific revisions.


Issue migrated from trac:356 at 2024-01-31 18:33:30 +1100

penguian commented 6 years ago

@martin.dix@anu.edu.au commented


What's the best way to do this with git?

penguian commented 6 years ago

pbd562@nci.org.au commented


A hard git reset can be used to revert to a previous version. For example:

git clone https://github.com/peterdobro/mom.git
cd mom
git log
...
commit 6101fb8495320ad1f00cade28a9af89c855302b3
Author: Peter Dobrohotoff <peter.dobrohotoff@csiro.au>
Date:   Mon Feb 19 16:35:31 2018 +1100
...
git reset --hard 6101fb8495320ad1f00cade28a9af89c855302b3

Note that a hard reset throws away changes to tracked files, and so should be done before making further changes.