Skip to content

Can I add new metadata to an existing commit? #2977

Answered by cgwalters
cgwalters asked this question in Q&A
Discussion options

You must be logged in to vote

There is "detached metadata" that can change independently of a commit; however, it's not used for much commonly besides signatures. One reason for this is that any such metadata is inherently then not covered by a signature.

In most of these situations, you actually want to make a new commit that "inherits" from the previous one, like this:

$ ostree commit --base $base --keep-metadata <metadata>

There isn't yet an ergonomic way via the CLI to inherit all metadata. It is however easy to do this with the shared library API.

Replies: 1 comment

Comment options

cgwalters
Aug 14, 2023
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by cgwalters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant