Skip to content

Git Sync

Collaborate with teams using git-backed task synchronization.

Basic Sync

Sync All Repositories

tsk sync

Performs: 1. Commits local changes 2. Pulls from remote 3. Resolves conflicts 4. Pushes changes

Sync Specific Repository

tsk sync --repo work

Pull Only (No Push)

tsk sync --no-push

Setup Remote

Add Git Remote

cd ~/tasks/tasks-work
git remote add origin https://github.com/user/tasks-work
git push -u origin main

GitHub Repository

Create repository on GitHub, then:

gh repo create tasks-work --private

Conflict Resolution

When local and remote tasks diverge, TaskRepo automatically resolves conflicts.

Resolution Strategies

Auto (Default)

tsk sync --strategy auto
  • Smart merge when possible
  • Interactive prompt for complex conflicts

Local

tsk sync --strategy local
  • Always keep local version

Remote

tsk sync --strategy remote
  • Always keep remote version

Interactive

tsk sync --strategy interactive
  • Always prompt for resolution

Smart Merge

TaskRepo uses timestamps to intelligently merge conflicts.

Simple fields: Uses newer version - status, priority, title

List fields: Creates union - assignees, tags, links

Description: Requires manual resolution

Sync Workflow

Individual Workflow

# Morning: Pull updates
tsk sync --no-push

# Work on tasks
tsk add -r work -t "New task"
tsk done 5

# Evening: Push changes
tsk sync

Team Workflow

# Regular sync cadence
tsk sync  # Every hour or before/after work

# Before making changes
tsk sync --no-push

# After completing work
tsk sync

Conflict Example

Local version:

status: in-progress
priority: H

Remote version:

status: done
priority: M

Auto merge result (using newer timestamp):

status: done        # Remote is newer
priority: H         # Local is newer

Common Issues

No Remote Configured

Error: "No remote configured"

Fix: Add git remote

cd ~/tasks/tasks-work
git remote add origin <url>

Push Rejected

Error: "Updates were rejected"

Fix: Pull first

tsk sync --no-push
tsk sync

Merge Conflicts

Fix: Use interactive resolution

tsk sync --strategy interactive

Collaboration Best Practices

Sync Often

Sync multiple times per day to minimize conflicts

Communicate Changes

Inform team about major task updates

Use Branches

For experimental work, create git branches

Consistent Format

Agree on task format conventions

Advanced Sync Options

Verbose Output

tsk sync --verbose

Shows: - Timing information - Detailed progress - Per-operation status

Auto-Merge Control

tsk sync --no-auto-merge

Disables automatic merging, always prompts.

README Generation

Sync automatically updates README.md with task tables.

Location: Repository root Content: Active tasks, statistics Archive: tasks/archive/README.md

See Also