team-git-sync-and-merge

Enforces workspace-isolated Git branching and leader-only merge workflows for team repositories.

1|Updated Sep 1, 2026
One-click install
npx skills add https://github.com/nvtruongops/pi-guard --skill team-git-sync-and-merge-nvtruongops
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: team-git-sync-and-merge
Source: https://github.com/nvtruongops/pi-guard/tree/main/.agents/skills/team-git-sync-and-merge
Command: npx skills add https://github.com/nvtruongops/pi-guard --skill team-git-sync-and-merge-nvtruongops

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Team projects often suffer from merge conflicts and unclear ownership when multiple members edit shared directories. This Skill defines a strict Git collaboration protocol where each member works only inside a personal workspace folder and only the team leader merges code into shared directories and the main branch. ## Core Features & Use Cases - Permission Matrix: Maps each member to a personal Git branch and an exclusive workspace directory, with merge rights reserved for the leader. - Daily Member Workflow: Standardizes rebase-from-main, workspace-only editing, pre-commit boundary audits, and pushing to personal feature branches. - Leader Convergence Workflow: Guides the leader through auditing member branches, promoting champion code into shared folders, compiling reports, and merging into main. - Use Case: A four-member capstone team uses this protocol so members commit only inside workspaces/<name>/, run the boundary audit script before committing, and the leader consolidates the best artifacts into src/, docs/, and reports/ during weekly meetings. ## Quick Start Ask the assistant to walk you through the daily member workflow for syncing your feature branch with main and auditing your staged changes before committing.

Frequently Asked Questions about team-git-sync-and-merge

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

FAQPage Schema
How do I avoid merge conflicts in a team Git repository?

Assign each member an exclusive workspace directory and personal feature branch so no two people edit the same files. Members rebase onto origin/main daily, and only the leader merges changes into shared folders and the main branch.

How do I sync my feature branch with the main branch?

Run git fetch origin followed by git rebase origin/main on your feature branch before starting work each day. This replays your commits on top of the latest main, keeping history linear and reducing later merge conflicts.

How can I enforce folder-level permissions in Git?

Use a pre-commit audit script that checks staged files against each member's allowed workspace directory and fails the commit if files fall outside it. Combine this with a governance rule that only the leader pushes to shared directories and main.

What should I do when a rebase conflict occurs on shared config files?

Keep your own additions, such as extra dependencies at the end of requirements.txt, then run git add on the resolved file and git rebase --continue. Notify the team leader so the change is consolidated during the weekly merge meeting.

When is a leader-only merge workflow not suitable?

This model creates a bottleneck when teams are large or need continuous delivery, since all integration waits on one person. In those cases, use code-owner reviews with CI-gated pull requests instead of a single merge gatekeeper.