HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

ostree — Version control for binary files similar to `git` but optimized for operating system root filesystem

Submitted by: @import:tldr-pages··
0
Viewed 0 times
ostreecommandfilesclicontrolbinaryforversion
linux

Problem

How to use the ostree command: Version control for binary files similar to git but optimized for operating system root filesystems. OSTree is the foundation for immutable image-based operating systems such as Fedora Silverblue, Fedora IoT or Fedora CoreOS. More information: <https://ostreedev.github.io/ostree/>.

Solution

ostree — Version control for binary files similar to git but optimized for operating system root filesystems. OSTree is the foundation for immutable image-based operating systems such as Fedora Silverblue, Fedora IoT or Fedora CoreOS. More information: <https://ostreedev.github.io/ostree/>.

Initialize a repository of the files in $PWD with metadata in $PWD/path/to/repo:
ostree init --repo {{path/to/repo}}


Create a commit (snapshot) of the files:
ostree commit --repo {{path/to/repo}} --branch {{branch_name}}


Show files in commit:
ostree ls --repo {{path/to/repo}} {{commit_id}}


Show metadata of commit:
ostree show --repo {{path/to/repo}} {{commit_id}}


Show list of commits:
ostree log --repo {{path/to/repo}} {{branch_name}}


Show repo summary:
ostree summary --repo {{path/to/repo}} --view


Show available refs (branches):
ostree refs --repo {{path/to/repo}}

Code Snippets

Initialize a repository of the files in `$PWD` with metadata in `$PWD/path/to/repo`

ostree init --repo {{path/to/repo}}

Create a commit (snapshot) of the files

ostree commit --repo {{path/to/repo}} --branch {{branch_name}}

Show files in commit

ostree ls --repo {{path/to/repo}} {{commit_id}}

Show metadata of commit

ostree show --repo {{path/to/repo}} {{commit_id}}

Show list of commits

ostree log --repo {{path/to/repo}} {{branch_name}}

Context

tldr-pages: linux/ostree

Revisions (0)

No revisions yet.