Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Storing repository meta-data in GIT

I'm want to store metadata per GIT repository such as which branches to use during CI/CD processes.

It seems natural to store the relevant metadata within each GIT repository, however, then the metadata itself is branched.

If I store the metadata within GIT, then each time the file is changed i.e. each time it is merged back into the master branch, the merge will trigger a build.

Question: Is there a way to ignore a specific file in (all repositories') build trigger?

I would also appreciate comments/answers on other ways to solve the root problem - storing metadata on the repositories to be used by CI/CD processes.

Alternative I am considering: Store this metadata in a database, however, then, as the metadata will not be stored near the branches, I am afraid developers may forget to set or update it.

like image 225
Danny Varod Avatar asked Sep 11 '25 13:09

Danny Varod


1 Answers

If you are talking about metadata (meaning not a data stored in a file), you might consider git notes

Adds, removes, or reads notes attached to objects, without touching the objects themselves.

By default, notes are saved to and read from refs/notes/commits, but this default can be overridden.

That way, you can push those metadata, as you would for regular commits and their files.

The other workaround would be to associate a description to a branch: that is another metadata which can be pushed.

like image 196
VonC Avatar answered Sep 14 '25 05:09

VonC