How to manage many files "individually"?

I have many scripts to create reports e.g. of AFM measurements. Each measurement has its own folder with only a single script for report creation. I would like to manage all those scripts via github using a single repository. I’m not sure how to set this up in an easy way. Especially how to only update/commit and push single files without using the complete repository for each measurement.

For context, I use pycharm for coding, including commits and updates to github. But the specific solution for pycharm might be a little offtopic.

What exactly do you mean by that? As a matter of principle, to make commits you need to have full clone of the repository.

Adding/updating only specific files is no problem with the standard git add FILE, git commit workflow.

Hmm, I’m open for alternatives. My goal is to keep the local folders “clean”. I can easily haver 100+ python-scripts of similar kind (a number, that will only increase in future), that might be edited at some point, and I would like to have a history and a place, where I can find all scripts easily from everywhere around the world. On the other hand, I do not want 100+ python scripts in all measurement folders, when only one of them is needed. But to create an individual repository for each measurement seems to be overkill. Maybe some kind of “subrepository”, or a completly different workflow? Or maybe github simply is not the right tool for this usecase.

Hm, it’s difficult to suggest alternatives without knowing what you want to do, as in the purpose of your setup. So far I gathered that you need to version scripts that somehow take measurements (sounds like a job for git).

Then there’s the bit with “measurement folders”. Are those for storing results? And if those don’t need all scripts, does that mean the scripts will run on different devices?

Yeah, each measurement folder contains measurement data for a specific sample and maybe some additional data like images from a microscope. I have written a package to create automated reports for thus measurements. But there are always some parts, that are specific to a measurement (contact data, something went wrong during measurement, results from other sorces …), so each measurement needs a customized report. Thats done in a python script, which is stored together with the measurement data. If we later learn more about a sample or want to know something different, it might be neccessary to change a script (therefore a history would be nice; also the ability to change the script from different PCs). The filenames for different measurements might be quite similar (only one letter changed), so it would be likly to make unwanted errors if all scripts for all measurements would be in one folder locally. Now I want an easy way to put thus files in a version control system without creating hundreds of repositories, but also without putting all scripts in the same folder on my local pc/laptop.

If you want to version only the scripts I think a single repository might make sense, it’s not like it’s going to take a lot of disk space. And you can use directories within a repository to sort things as you want.

However, I’m wondering if it might make sense to have per-project repositories that store the measurement data and possibly other associated data (notes, etc.) as well. That’s basically what I did for my thesis. :slightly_smiling_face: