What problem does it solve?
Merging feature or task branches into main can often introduce messy merge commits, complicating the Git history and making debugging or future reverts harder. Ensuring a clean, linear history requires careful validation and specific Git commands that are easy to misuse. This Skill automates the process for a pristine main branch.
Core Features & Use Cases
- Pre-Merge Validation: Automatically verifies that the task branch is ready for merge (e.g., exactly one squashed commit, current branch is
main), preventing common merge errors.
- Fast-Forward Merge: Executes a
--ff-only merge to guarantee a linear history, preventing unnecessary merge commits and keeping the commit graph clean.
- Post-Merge Verification: Confirms that the history remains linear and that the correct commit has been added to
main, ensuring the merge was successful and as intended.
- Use Case: After completing a feature on a task branch and squashing all commits into one, you need to merge it into
main. This Skill ensures the merge is clean, linear, and validated, preventing accidental non-fast-forward merges or merging an un-squashed history, saving you from Git headaches.
Quick Start
From the 'main' branch, use the git-merge-linear skill to merge the 'implement-formatter-api' task branch.