summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-07-13 21:26:16 +0300
committerPaul Buetow <paul@buetow.org>2025-07-13 21:26:16 +0300
commit735cbc11e1a3e103a69c03390b5f40ecc810dc9c (patch)
tree0622c72f3c9d3ea2f8c9e9fd39d59a68b87d6351 /README.md
parentfa5ef028ec9a7af801710eed190057d3b3c172f0 (diff)
fix: update default config path to follow XDG Base Directory spec
- Change default config from ~/.gitsyncer.json to ~/.config/gitsyncer/config - Update all documentation and help text to reflect new path - LoadConfig still checks common locations for backward compatibility: - ./gitsyncer.json - ~/.config/gitsyncer/config (new default) - ~/.gitsyncer.json This follows the XDG Base Directory specification for better organization of configuration files. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 6 insertions, 6 deletions
diff --git a/README.md b/README.md
index b55df79..afaaeb9 100644
--- a/README.md
+++ b/README.md
@@ -39,7 +39,7 @@ go build -o gitsyncer ./cmd/gitsyncer
## Configuration
-Create a `gitsyncer.json` file:
+Create a configuration file at `~/.config/gitsyncer/config` (or specify a custom path with `-c`):
```json
{
@@ -245,13 +245,13 @@ gitsyncer version
These options are available for all commands:
-- `-c, --config` - Path to configuration file (default: ~/.gitsyncer.json)
+- `-c, --config` - Path to configuration file (default: ~/.config/gitsyncer/config)
- `-w, --work-dir` - Working directory (default: ~/git/gitsyncer-workdir)
- `-h, --help` - Show help for any command
## The --backup Flag
-The `--backup` flag enables syncing to backup locations configured in your `gitsyncer.json`. This is particularly useful when:
+The `--backup` flag enables syncing to backup locations configured in your config file. This is particularly useful when:
- Your backup server might be offline (e.g., home NAS)
- You want to control when backups happen
- You need to separate regular syncing from backup operations
@@ -328,7 +328,7 @@ You can configure SSH backup locations for one-way repository backups to private
### SSH Backup Example
```bash
-# Configure your gitsyncer.json with an SSH backup location
+# Configure your config file with an SSH backup location
# Backup locations are DISABLED by default to handle offline servers
# Sync without backup (default behavior)
@@ -436,7 +436,7 @@ The batch-run feature is designed for automated weekly synchronization from cron
### Sync specific repositories
1. Create repositories on all platforms (GitHub, Codeberg, etc.)
-2. Add the repository name to your `gitsyncer.json`
+2. Add the repository name to your configuration file
3. Run `gitsyncer sync repo repo-name`
4. GitSyncer will:
- Clone from the first organization
@@ -444,7 +444,7 @@ The batch-run feature is designed for automated weekly synchronization from cron
- Keep them in sync going forward
### Sync all public Codeberg repositories
-1. Ensure Codeberg is in your organizations list
+1. Ensure Codeberg is in your organizations list in the config
2. Run `gitsyncer sync codeberg-to-github`
3. GitSyncer will:
- Fetch all public repositories from your Codeberg account