push-public

Synchronize the public Git branch with main via a clean commit in an isolated worktree.

1|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/ongspxm/mobot_skills --skill push-public
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: push-public
Source: https://github.com/ongspxm/mobot_skills/tree/main/push-public
Command: npx skills add https://github.com/ongspxm/mobot_skills --skill push-public

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill automates the process of publishing changes from the 'main' branch to the 'public' branch of a Git repository, ensuring a clean and concise commit history on the public branch without exposing the detailed commit history of the main branch.

Core Features & Use Cases

  • Snapshotting main to public: Creates a clean representation of the main branch's current state on the public branch.
  • Worktree Isolation: Utilizes a separate Git worktree to prevent interference with the primary working directory and main branch.
  • Clean Commit History: Allows for the creation of new, focused commits on the public branch that reflect actual changes, rather than a full merge history.
  • Use Case: After merging several features into main, you want to update the public branch with a single, clean commit that represents the latest stable state, without cluttering the public history with intermediate development commits.

Quick Start

Execute the push-public skill to update the public branch with the latest changes from main.

Frequently Asked Questions about push-public

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

FAQPage Schema
How do I publish a Git main branch to a public branch without merge commits?

To publish a Git main branch to a public branch without merge commits, you can synchronize them by creating a single clean commit on the public branch that reflects the main branch's current state. This prevents intermediate development history from cluttering the public branch.

What is the best way to keep a public Git branch updated with only the latest stable state?

The best way to keep a public Git branch updated with the latest stable state is to snapshot the main branch. This process stages the differences into a new, focused commit on the public branch rather than exposing the full merge history.

How do I sync branches in Git without interfering with my primary working directory?

To sync branches in Git without interfering with your primary working directory, you can perform the synchronization in an isolated worktree. This maintains the integrity of both the main working directory and the main branch history during the push process.

Does this branching method fetch remote changes before resetting the public worktree?

Yes, this branching method fetches all remote changes and pulls the latest from the main branch first. It then resets the isolated public worktree to match main, stages the differences, and pushes the new commit to the remote public branch.

When should I use a clean commit history for a public branch instead of a standard merge?

You should use a clean commit history for a public branch instead of a standard merge when you want to update the public branch with a single commit representing the latest stable state. This is ideal after merging several features into main, avoiding intermediate development commits on the public remote.