Usage
af file [OPTIONS] <COMMAND>Commands
| Command | What it does |
|---|---|
list |
List the files in a commit |
annotate |
Show the change that added each line of a file |
show |
Print a file’s contents at a commit |
untrack |
Stop tracking files that are ignored |
Global options
Every af command also takes the global options.
Examples
af file list
af file show src/main.rs
af file show -r 'main-' settings.ini
af file untrack buildaf file list
List the files in a commit
Usage
af file list [OPTIONS] [PATHS]...Arguments
-
[PATHS]...Glob patterns, from the repository root, limiting the files listed
For example,
docs/**matches everything underdocs, whiledocsmatches only a file nameddocs.
Options
-
-r, --revision <REVISION>Revset selecting the commit; defaults to the workspace’s change
Global options
Every af command also takes the global options.
af file annotate
Show the change that added each line of a file
Prints each line of PATH with the change that added it, and that change’s author and time. Lines are printed exactly as the file stores them.
Usage
af file annotate [OPTIONS] <PATH>Arguments
-
<PATH>File to annotate, relative to the current directory
Options
-
-r, --revision <REVISION>Revset selecting the commit; defaults to the workspace’s change
Global options
Every af command also takes the global options.
af file show
Print a file’s contents at a commit
Usage
af file show [OPTIONS] <PATH>Arguments
-
<PATH>File to print, relative to the current directory
Options
-
-r, --revision <REVISION>Revset selecting the commit to read from; defaults to main’s latest landing
Global options
Every af command also takes the global options.
af file untrack
Stop tracking files that are ignored
Takes the files at or under each PATH out of the workspace’s change and stops tracking them, leaving them on disk, as jj file untrack does. Each must be ignored by a .gitignore, or the next snapshot would take it back: if one isn’t, nothing is untracked.
Usage
af file untrack [OPTIONS] <PATHS>...Arguments
-
<PATHS>...Files or directories, relative to the current directory
Global options
Every af command also takes the global options.