overleaf-git-sync

Synchronize Overleaf project content with Git while guarding against stale pushes.

33|1|Updated Apr 29, 2026
One-click install
npx skills add https://github.com/genggng/overleaf-git-sync --skill overleaf-git-sync
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: overleaf-git-sync
Source: https://github.com/genggng/overleaf-git-sync/tree/main
Command: npx skills add https://github.com/genggng/overleaf-git-sync --skill overleaf-git-sync

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents agents from accidentally overwriting newer Overleaf changes by enforcing a Git-based freshness-and-verification workflow before any push back to Overleaf.

Core Features & Use Cases

  • Pull-then-review remote changes: Agents import the latest Overleaf snapshot into the tool-managed branch, inspect staged results, and commit the merge when needed.
  • Push only committed, conflict-free edits: Agents push only after Git indicates a clean worktree and no unresolved merge conflicts, reducing the risk of stale or conflicting uploads.
  • Verify remote state after publishing: Agents rely on the tool’s post-push snapshot verification so remote and local normalized content match before declaring success.
  • Use-case: An agent revises a multi-file LaTeX manuscript while the user may have edited the same project in Overleaf; this Skill guides the agent to safely incorporate any new remote edits and only then apply its own changes.

Quick Start

Run ol pull, review staged remote changes if any by committing the merge, then edit files, commit your changes, and finish with ol push --dry-run followed by ol push.

Frequently Asked Questions about overleaf-git-sync

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync Overleaf projects with Git without causing conflicts?

Overleaf Git sync maps remote snapshots into a local Git workflow, enforcing a freshness pull and clean worktree checks before pushing to prevent stale or conflicting uploads. You pull, review staged changes, commit, then push.

How do I safely edit LaTeX files in Overleaf while collaborating with someone else?

Overleaf Git sync imports the latest remote snapshot into a managed branch so you can review staged changes before merging. You commit your edits only after resolving conflicts and confirming a clean worktree, avoiding overwrites.

Why does my Overleaf Git push fail due to stale remote changes?

Overleaf Git sync blocks stale pushes by requiring a prior freshness pull to import the latest remote snapshot. You must commit any staged remote changes and ensure no unresolved conflicts exist before pushing your local edits.

What is the best way to verify Overleaf remote state after a Git push?

Overleaf Git sync uses post-push snapshot verification to ensure remote and local normalized content match after publishing. You run ol push --dry-run followed by ol push, then rely on the tool to verify the remote state matches.

Can I use Git to manage Overleaf LaTeX manuscripts with automated agents?

Yes, Overleaf Git sync supports agent-driven editing of LaTeX project files like tex, bib, sty, cls, and md. The agent pulls remote snapshots, resolves conflicts locally, and applies controlled pushes using the ol command sequence.

Does Overleaf Git sync require a clean worktree before pushing changes?

Yes, Overleaf Git sync enforces a clean worktree with no unresolved merge conflicts before allowing a push. You must commit the merge after reviewing staged remote changes to ensure only conflict-free edits are published to Overleaf.