Skip to content

Commands and Flags

Akash Rajpurohit edited this page Aug 22, 2024 · 5 revisions

Commands

Sync Repositories

To sync your repositories, run the following command:

git-sync

This command will clone or update all your repositories to the specified backup directory.

Version

To check the version of git-sync, run the following command:

git-sync version

Help

To view the help message, run the following command:

git-sync help

Flags

Configuration File

You can specify the path to the configuration file using the --config flag. For example:

git-sync --config /path/to/config.yaml

Backup Directory

You can specify the backup directory using the --backup-dir flag. For example:

git-sync --backup-dir /path/to/backup

Setup Cron

Since v0.7.0, you can now setup cron job directly from the CLI tool instead of maintaining a cron job yourself. To do so, use the --cron flag and pass a valid cron expression.

git-sync --cron "* * * * *"

Log level

You can specify the log level using the --log-level flag. For example:

git-sync --log-level=debug

Default log level is info. Available log levels are debug, info, warn, error and fatal.

Clone this wiki locally