Skip to content
Back to skills

Ff Worktrees

ASecurity

Fast-forward master and every git worktree branch up to a target ref (default github/master), skipping any worktree with unmerged commits. Use when the user wants to sync/update their worktree branches to latest master — e.g. "/ff-worktrees", "ff all worktrees to github/master", "fast-forward the worktrees".

  • 317 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
developmentbashgit

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add damus-io/notedeck --skill ff-worktrees --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ff Worktrees?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ff Worktrees
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/damus-io-ff-worktrees/badge)](https://www.skillsdirectory.com/skills/damus-io-ff-worktrees)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ff-worktrees
description: Fast-forward master and every git worktree branch up to a target ref (default github/master), skipping any worktree with unmerged commits. Use when the user wants to sync/update their worktree branches to latest master — e.g. "/ff-worktrees", "ff all worktrees to github/master", "fast-forward the worktrees".
---

# ff-worktrees

Fast-forwards `master` and every branch checked out in a git worktree up to a
target ref. Only true fast-forwards are applied: a branch is advanced solely
when it is already an ancestor of the target. Worktree branches carrying their
own unmerged commits are left untouched and reported as skipped, so no work is
ever clobbered.

## Running it

```bash
scripts/ff-worktrees.sh [target]
```

- `target` — ref to fast-forward toward. Defaults to `github/master`. When it
  looks like `<remote>/<branch>` and `<remote>` is configured, the remote is
  fetched first.

Examples:

```bash
scripts/ff-worktrees.sh                 # ff everything to github/master
scripts/ff-worktrees.sh origin/master   # ff everything to origin/master
```

## Behavior

- Fetches the target's remote first (when the target is `<remote>/<branch>`).
- Fast-forwards each branch in place inside its worktree via `merge --ff-only`;
  untracked files and non-conflicting local edits survive.
- A branch not checked out in any worktree (e.g. `master` when it's idle) has
  its ref moved directly, still guarded by an ancestry (fast-forward) check.
- Reports a one-line summary per branch: `+` advanced, `=` already up to date,
  `~` skipped for unmerged commits, `!` skipped because a dirty worktree blocks
  the fast-forward.

Safe to run from any worktree — it never resets a branch or discards commits.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.