Markus Michalski FAQ

git-sync-all: Troubleshooting

Common git-sync-all problems and their causes: lock file, config errors, flags without effect, failed pull, stash conflicts, repositories that are not found.

Deutsche Version

Back to overview

git-sync-all: Troubleshooting

"Another instance is running"

[ERROR] Another instance is running (PID 12345). Remove /run/user/1000/git-sync-all.lock if stale.

A second instance is running, or the lock file belongs to a process that still exists. The tool removes lock files whose PID is no longer running on its own. Check with ps -p 12345 whether the process is alive and otherwise delete the file by hand. The path is ${XDG_RUNTIME_DIR:-/tmp}/git-sync-all.lock.

"Config error: directory not found"

[ERROR] Config error: directory not found: /home/you/projekte (SYNC_BASE_DIRS)

At least one entry in SYNC_BASE_DIRS does not exist. The tool validates the directories from the config before it evaluates directory arguments. Passing a directory therefore does not help as long as the default ~/projekte is missing. Create the directory or set SYNC_BASE_DIRS in the config file to an existing path.

--yes or --no-tags has no effect

The config file overrides these flags when it sets the variable itself. The file copied from the example file does. Comment out SYNC_AUTO_CONFIRM, SYNC_TAGS, SYNC_COLOR and SYNC_CONFLICT_STRATEGY, or set the values in the file. See Precedence.

"Unknown option: -vv"

Short options cannot be combined. -v already enables debug output (level 2). Two -v give level 3, which validation rejects unless the config file sets SYNC_VERBOSITY itself.

Commit message ends with }

The current code appends a } to the commit template. This affects every automatically generated message. You cannot prevent it through the config; the message can only be overridden in the interactive prompt.

"Pull failed"

[ERROR]   Pull failed
[WARN]    Aborting rebase to restore clean state...
[OK]      Rebase aborted, repo restored

The pull failed because of conflicts or a remote connection problem. The tool aborted the rebase or merge and the repository is back in its previous state. Fetch the changes by hand:

cd ~/projekte/my-project
git status
git pull --rebase origin <branch>

Resolve conflicts, continue with git rebase --continue and run git-sync-all again afterwards. If the tool reports Failed to abort rebase, run git rebase --abort in the repository yourself.

"Stash pop has conflicts"

After a successful pull the stashed changes could not be restored cleanly. Resolve the conflicts in the files and then run git stash drop. If the pull itself fails, the tool tries to restore the stash. If that fails too, your changes stay in git stash list.

The run continues after q

Answering q ends only the current repository (Aborted by user, counted as Failed). The run continues with the remaining repositories and ends with exit code 1. Press Ctrl+C to stop the whole run.

A repository is missing from the output

All repositories with changes are Skipped

Without a terminal and without auto mode the tool skips every repository with changes and reports Non-interactive mode, skipping. Use --yes or a config with SYNC_AUTO_CONFIRM=true.

Git version warning

[WARN]  Git version 2.15 detected. Recommend >= 2.17 for --prune-tags support.

The tool keeps running. Update Git if you need tag synchronization.

Local tags disappear, or are not deleted

Removing local tags depends on fetch.prune or remote.<name>.prune in your Git configuration, not on git-sync-all. See Sync workflow.