One option is to explicitly forbid running code on dirty commits. Another option is to give users an additional safety net and snapshot code whenever they run an experiment. Each one has its pros and cons and it is up to you to decide.“But how about tracking code in-between commits? What if someone runs an experiment without committing the code?”
conda env create -f environment.yaml
conda env export > environment.yaml