'\" t
.\"     Title: ostree checkout
.\"    Author: Colin Walters <walters@verbum.org>
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 09/27/2023
.\"    Manual: ostree checkout
.\"    Source: OSTree
.\"  Language: English
.\"
.TH "OSTREE CHECKOUT" "1" "" "OSTree" "ostree checkout"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ostree-checkout \- Check out a commit into a filesystem
.SH "SYNOPSIS"
.HP \w'\fBostree\ checkout\fR\ 'u
\fBostree checkout\fR [OPTIONS...] {COMMIT} [DESTINATION]
.SH "DESCRIPTION"
.PP
Checks out the given commit into the filesystem under directory DESTINATION\&. If DESTINATION is not specified, the COMMIT will become the destination checkout target\&. If COMMIT destination already exists, command will error unless
\fB\-\-union\fR
option is selected\&.
.SH "OPTIONS"
.PP
\fB\-\-user\-mode\fR, \fB\-U\fR
.RS 4
Do not change file ownership or initialize extended attributes\&.
.RE
.PP
\fB\-\-subpath\fR="PATH"
.RS 4
Checkout sub\-directory PATH\&.
.RE
.PP
\fB\-\-union\fR
.RS 4
Keep existing directories and unchanged files, overwrite existing files\&.
.RE
.PP
\fB\-\-union\-add\fR
.RS 4
Keep existing directories and files\&.
.RE
.PP
\fB\-\-union\-identical\fR
.RS 4
Like
\-\-union, but error out if a file would be replaced with a different file\&. Add new files and directories, ignore identical files, and keep existing directories\&. Requires
\-H\&.
.RE
.PP
\fB\-\-whiteouts\fR
.RS 4
Process whiteout files (Docker style)\&.
.RE
.PP
\fB\-\-process\-passthrough\-whiteouts\fR
.RS 4
Enable overlayfs whiteout extraction into 0:0 character devices\&. Overlayfs whiteouts are encoded inside ostree as
\&.ostree\-wh\&.filename
and extracted as 0:0 character devices\&. This is useful to carry container storage embedded into ostree\&.
.RE
.PP
\fB\-\-allow\-noent\fR
.RS 4
Do nothing if specified path does not exist\&.
.RE
.PP
\fB\-\-from\-stdin\fR
.RS 4
Process many checkouts from standard input\&.
.RE
.PP
\fB\-\-from\-file\fR="FILE"
.RS 4
Process many checkouts from input file\&.
.RE
.PP
\fB\-\-fsync\fR="POLICY"
.RS 4
POLICY is a boolean which specifies whether fsync should be used or not\&. Default to true\&.
.RE
.PP
\fB\-\-require\-hardlinks\fR, \fB\-H\fR
.RS 4
Do not fall back to full copies if hardlinking fails\&.
.RE
.PP
\fB\-\-force\-copy\-zerosized\fR, \fB\-z\fR
.RS 4
This option does nothing; the functionality is now always on by default\&.
.RE
.PP
\fB\-\-force\-copy\fR, \fB\-C\fR
.RS 4
Never hardlink (but may reflink if available)\&.
.RE
.PP
\fB\-\-bareuseronly\-dirs\fR, \fB\-M\fR
.RS 4
Suppress mode bits outside of 0775 for directories (suid, world writable, etc\&.)\&.
.RE
.PP
\fB\-\-skip\-list\fR="FILE"
.RS 4
Skip checking out the absolute file paths listed in FILE, one per line\&.
.RE
.PP
\fB\-\-selinux\-policy\fR
.RS 4
Set SELinux labels based on policy in root filesystem PATH (may be /)\&. This implies
\-\-force\-copy\&.
.RE
.SH "EXAMPLE"
.PP
\fB$ ostree checkout my\-branch\fR
.PP
\fB$ ls\fR
.sp
.if n \{\
.RS 4
.\}
.nf
        file1\ \&\ \&\ \&\ \&file2\ \&\ \&\ \&\ \&\fImy\-branch\fR
.fi
.if n \{\
.RE
.\}
