Grence

Track

Start tracking the given pattern(s) through Git Graph.

The track command allows you to specify pattern(s) for files or paths that Git Graph should manage. These patterns are stored in the .gitattributes file, enabling Git Graph to process matching files accordingly. If no patterns are provided, the command will list the currently tracked paths.

Usage

$ git graph track [options] [<pattern>...]

Description

Run the track command to either add or list tracked patterns. When pattern arguments are provided, Git Graph updates your repository's .gitattributes file to include the provided pattern(s) for tracking. If no patterns are given, the command outputs the current tracking configuration. This facilitates both the initial setup of tracking patterns as well as auditing existing tracked paths.

Use the --filename flag when you need to specify exact filenames rather than patterns that may include glob characters. In such cases, any special glob characters will be escaped when writing to .gitattributes.

Options

  • -d, --dry-run (default: false)

    When enabled, the command will simulate the tracking operations. It logs all the actions it would normally take (such as modifying .gitattributes or touching files on disk) without making any actual changes.

  • -f, --filename (default: false)

    Interprets the provided arguments as literal filenames instead of patterns. This flag ensures that any special glob characters in the filename are escaped, preserving the literal match in the .gitattributes file.

  • -h, --help

    Display help for the command.

Examples

Listing Tracked Patterns

To list the patterns that Git Graph is currently tracking, simply run:

git graph track

Tracking Patterns

To configure Git Graph to track all files matching the JSONL file extension:

git graph track "*.jsonl"

Tracking a Specific File

To configure Git Graph to track a specific file (e.g., my_graph.jsonl), using literal matching:

git graph track --filename "my_graph.jsonl"

Help

You can display the help for the track command by running:

$ git graph track -h
 
Usage: git-graph track [options] [<pattern>...]
 
Start tracking the given pattern(s) through Git Graph. The argument is
written to .gitattributes. If no paths are provided, simply list the
currently-tracked paths.
 
Arguments:
  <pattern>       Pattern(s) to match against paths in the repository.
 
Options:
  -d, --dry-run   If enabled, have git lfs track log all actions it would normally take
                  (adding entries to .gitattributes, touching files on disk, etc) without
                  performing any mutative operations to the disk (default: false)
 
  -f, --filename  Treat the arguments as literal filenames, not as patterns. Any special glob
                  characters in the filename will be escaped when writing the .gitattributes
                  file. (default: false)
 
  -h, --help      display help for command
 
Examples
--------
 
* List the patterns that Git Graph is currently tracking:
 
  git graph track
 
* Configure Git Graph to track JSONL files:
 
  git graph track "*.jsonl"
 
* Configure Git Graph to track the file named my_graph.jsonl:
 
  git graph track --filename "my_graph.jsonl"

How is this guide?

On this page