Your daily Git workflow

A simpler Git workflow with gix sync.

Pull remote changes, keep your local work, commit pending files, and publish the selected branch with one command.

Git underneath. A prescribed daily workflow for GitHub. Fleet maintenance is included.

daily sync
# Select a branch explicitly
gix sync feature/my-change

# Update the current branch
gix sync

# Select a configured remote
gix sync qqq --remote origin

One sync flow. An explicit destination.

Sync uses a valid Git repository with a configured, reachable remote and an existing default branch.

Select the branch

gix sync qqq selects qqq. An explicit branch selects that destination, including the default branch.

If the explicitly named branch does not exist, sync creates it at the current HEAD. This permits stacked branches from your current work.

Use the current context

Without an argument on the default branch, sync creates a new branch only for uncommitted changes or unpublished local commits.

Without local work, sync updates the default branch and keeps it active. On another branch, plain gix sync uses that branch.

Publish work for review

Sync pulls remote changes, merges pending work, commits the result, and pushes the selected branch. That branch stays active.

A pull request requires file changes against its review base. Sync does not create an empty pull request.

The remote symbolic HEAD defines the default branch. Branch names and branch protection do not change an explicit destination.

Your work, conflicts, and publication results

Keep unpublished work

Sync keeps staged, unstaged, and untracked changes, plus unpublished work held in local commits, before it replaces local state.

Dirty work uses auto-commit by default. --stash carries pending files without auto-commit and restores the index after sync.

If the target still matches a merged pull request, sync rejects dirty auto-commit, even for an explicit target. Pending work remains available.

Bound conflict resolution

The configured LLM client supplies commit messages and repairs eligible text conflicts. Repair has bounded requests and a separate semantic audit.

Unresolved intent, invalid syntax, or exhausted requests stop publication. Before publication, sync restores your work when it can safely roll back its own changes. If another process changes that state, sync keeps recovery snapshots and reports the next steps.

Binary conflicts, rename conflicts, and unfinished Git operations can need manual action. Recovery keeps published work and gives explicit recovery instructions.

See push failures clearly

A rejected branch push returns a nonzero exit code. The remote did not receive the branch changes.

Sync keeps completed local commits and the selected branch, and restores its temporary stashes. Push rejection does not start rollback or report success.

If parent publication fails, sync keeps child work locally and defers its push and pull request.

Read the detailed sync contract for work preservation and publication rules.

Discard selected file changes separately

gix discard path/to/file directory/
gix discard --all

gix discard restores selected tracked paths in the Git index and worktree to HEAD, without a commit or push.

It keeps existing commits, unselected changes, and untracked files. Selected staged additions absent from HEAD are removed from the index and worktree.

Read the discard scope and restrictions before use.

Install and configure gix

Use the latest stable Go toolchain, Git, and the GitHub CLI (gh).

go install github.com/tyemirov/gix@latest
gix init

This website describes current source behavior. The latest published release can precede these source changes.

@latest installs the published release. Compare the release notes with the current source README for availability.

gix init creates ~/.gix/config.yml. Configure your roots, remote, and LLM connection profiles before sync.

Configure github.credential in ~/.gix/config.yml. The generated config uses ${GH_TOKEN} from the process environment. You can also supply a literal credential.

The LLM client uses llm.llm_proxy or llm.openai with credentials from the process environment. Gix does not load dotenv files.

Read the configuration reference for provider order, models, and environment variables.

Attach or verify a workspace

gix sync https://github.com/tyemirov/gix

In an empty directory, the URL form clones the repository. In an existing workspace, it verifies that the remote matches.

Maintain a fleet when you need to

The same CLI also audits repositories, aligns remotes, and runs declarative workflows across workspace roots.

Audit repositories

gix audit --roots ~/Development
gix web --roots ~/Development

Inspect audit results in the terminal or local browser workspace. Queue changes and apply the reviewed batch.

Normalize folders and remotes

gix folder rename --roots ~/Fleet --owner --yes
gix remote update-to-canonical --roots ~/Fleet

Align repository directories and canonical GitHub remotes across the selected roots.

Run a declared workflow

gix workflow configs/gitignore.yaml \
  --roots ~/Fleet

Run this example from a Gix source checkout. Review the workflow file for its branch, path, and confirmation settings.

Understand the workflow

Commands share repository discovery, configuration, and the workflow engine.

The architecture reference explains component ownership and execution.

The sync acceptance map connects the contract to CLI scenarios.