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
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
.gitattributesor 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
.gitattributesfile. -
-h, --helpDisplay help for the command.
Examples
Listing Tracked Patterns
To list the patterns that Git Graph is currently tracking, simply run:
Tracking Patterns
To configure Git Graph to track all files matching the JSONL file extension:
Tracking a Specific File
To configure Git Graph to track a specific file (e.g., my_graph.jsonl), using literal matching:
Help
You can display the help for the track command by running:
How is this guide?