PHPackages                             pmjones/daisy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. pmjones/daisy

ActiveLibrary

pmjones/daisy
=============

0.x-dev(6mo ago)09MITPHPPHP ^8.2CI passing

Since Oct 28Pushed 6mo agoCompare

[ Source](https://github.com/pmjones/daisy)[ Packagist](https://packagist.org/packages/pmjones/daisy)[ Docs](https://github.com/pmjones/daisy)[ RSS](/packages/pmjones-daisy/feed)WikiDiscussions 0.x Synced 1mo ago

READMEChangelogDependencies (5)Versions (1)Used By (0)

pmjones/daisy
=============

[](#pmjonesdaisy)

[![PDS Skeleton](https://camo.githubusercontent.com/50d01a5094afcc3a827c3cadaec43d23b2a256cb249f5fdd6e5ffdb53ea7971c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7064732d736b656c65746f6e2d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/php-pds/skeleton)[![PDS Composer Script Names](https://camo.githubusercontent.com/0c17df07fd0a51ad878f1de0d4c17ea8e460f2e96ce796c8cd58e6c96ed9c08d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7064732d636f6d706f7365722d2d7363726970742d2d6e616d65732d626c75653f7374796c653d666c61742d737175617265)](https://github.com/php-pds/composer-script-names)

Overview
--------

[](#overview)

Daisy is a tool for managing daisy chains of git branches.

Before [stacking](https://www.stacking.dev/) was cool, I had some bash scripts to do something similar for my refactoring work.

At the time, I thought of these sequentially dependent git branches as a "daisy chain". This package takes those bash scripts and collects them into something more manageable.

Installation
------------

[](#installation)

There are no releases yet; install the 0.x branch with Composer:

```
% composer global require pmjones/daisy 0.x-dev

```

I find it convenient to symlink it to a global path:

```
% ln -s ~/.composer/vendor/bin/daisy /usr/local/bin/daisy

```

Workflow
--------

[](#workflow)

From a "root" branch (e.g. `master` or `prod`) start a daisy chain like so:

```
% daisy start refactor
Starting a new daisy chain.
Created daisy chain refactor_@_ from prod.
On branch refactor_@_0
nothing to commit, working tree clean
%

```

You will now find two new branches with the `_@_` sigil in them, indicating they are part of a daisy chain:

- `refactor_@_` is a "start" branch, and keeps track of which branch served as the root for the daisy chain; and,
- `refactor_@_0` is the first numbered branch in the daisy chain itself.

Make your changes on the numbered branch and commit them. You can then add another branch to the daisy chain:

```
% daisy add
Adding a new branch to the daisy chain.
On branch refactor_@_1
nothing to commit, working tree clean
%

```

(The `_@_1` branch depends on the `_@_0` branch.) Make some changes on this added branch and commit them.

Keep adding branches to the chain until you're done.

You can find out where you are in the in the daisy chain with `branch`:

```
% daisy branch
refactor_@_3
%

```

You can see all the branches in the daisy chain with `chain`:

```
% daisy chain
refactor_@_0
refactor_@_1
refactor_@_2
refactor_@_3
refactor_@_4
refactor_@_5
%

```

If you need to go back and make some fixes, use `prev` to go back one or more steps:

```
% daisy branch
refactor_@_5
% daisy prev
refactor_@_4
% daisy prev 2
refactor_@_2
%

```

Make your changes, commit them, and then step forward one branch at a time to sync each branch first with the remote (via `git pull`) and then with its previous branch (via `rebase`):

```
% daisy branch
refactor_@_2
% daisy next
refactor_@_3
% daisy sync # git pull && git rebase refactor_@_2
%

```

If there are conflicts, you need to resolve them as with any rebase; `git add -A`, `git rebase --continue`, and so on.

Send each branch to the remote origin with `send`. The first time, this will set the upstream and push the branch:

```
% daisy branch
refactor_@_0
% daisy send # git push -u origin refactor_@_0
%

```

Therafter, `send` will force-push the branch:

```
% daisy branch
refactor_@_0
% daisy send # git push --force-with-lease
%

```

After you `send` a branch you can `open` it at GitHub to compare it with the previous branch. From there you can start a new PR or go to an existing PR.

```
% daisy branch
refactor_@_3
% daisy open # https://github.com/owner/repo/compare/refactor_@_2..refactor_@_3
%

```

You can `goto` any numbered branch directly:

```
% daisy goto 1
refactor_@_1
%

```

Temporary Offshoot Branches
---------------------------

[](#temporary-offshoot-branches)

You may sometimes need a temporary offshoot branch that is based on a numbered branch. These offshoots are not part of the daisy chain sequence, and can be useful for short-lived experiments.

To start a temporary branch, issue `temp` with a suffix name for the offshoot:

```
% daisy branch
refactor_@_2
% daisy temp SITE
Creating a temporary branch from the daisy chain.
On branch refactor_@_2-SITE
%

```

Each offshoot is a "dead end" in the sense that you cannot `add` a numbered branch from it, and you cannot create another `temp` branch from it. (You can create as many temp branches from the same numbered branch as you like.)

You can move back to the `prev` branch from the temporary offshoot; this will switch back to the numbered branch the offshoot came from.

```
% daisy branch
refactor_@_2-SITE
% daisy prev
refactor_@_2

```

Switching to the `next` branch from a temporary offshoot will switch to the next numbered branch.

```
% daisy branch
refactor_@_2-SITE
% daisy next
refactor_@_3
%

```

Likewise, switching to the `next` branch from a numbered branch will skip over any temporary branches:

```
% daisy branch
refactor_@_2
% daisy next
refactor_@_3
%

```

To switch to a temporary offshoot branch, use `goto`:

```
% daisy branch
refactor_@_2
% daisy goto 2-SITE
refactor_@_2-SITE
%

```

When you `diff` or `sync` a temporary offshoot branch, it will be against the numbered branch it is based on.

You can `send` and `open` a temporary offshoot branch like any other numbered branch.

Help
----

[](#help)

```
Daisy is a tool for managing daisy chains of git branches.

Usage:
    daisy

Creation Commands:

    start
        Starts a new daisy chain of branches with the  prefix
        by creating a special "start" branch. The "start" branch is
        an empty commit with a message indicating the "root" branch
        of the daisy chain. DO NOT work on this special "start"
        branch. It is for tracking the "root" branch only.

    add
        Adds a numbered branch to the end of the daisy chain.

    temp
        Adds a temporary offshoot branch from the current numbered
        branch, appending a "-" after the number. Note that
        the previous branch for a temporary branch is always the
        numbered branch from which it is an offshoot.

Navigation Commands:

    first
        Switches to the first numbered branch in the daisy chain.

    prev []
        Switches to the previous numbered branch in the daisy chain,
        or any number of  back to the first numbered branch.

    next []
        Switches to the next numbered branch in the daisy chain, or
        any number of  forward to the last numbered branch.

    last
        Switches to the last numbered branch in the daisy chain.

    goto (root | start | [-])
        Switches to the specified branch in the daisy chain.

Info Commands:

    branch
        Shows the current branch in the daisy chain.

    chain
        Shows the list of branches in the daisy chain, including
        temporary offshoot branches.

    diff [plain]
        Shows the color diff between the current branch in the daisy
        chain and the previous numbered branch (or the "root" branch
        if on the first numbered branch). Passing 'plain' shows a
        plain (not color) diff. To paginate a color diff, pipe the
        output to `less -r`.

Deletion Commands:

    drop ([-])
        Deletes the specified branch from the daisy chain using
        `git branch -d`.

    kill ([-])
        Deletes the specified branch from the daisy chain using
        `git branch -D`.

Management Commands:

    open
        Opens a comparison request at Github for the current branch
        against the previous numbered branch (or the "root" branch
        if on the first numbered branch).

    send
        Force-pushes the current branch in the daisy chain to the
        remote origin, setting the upstream if not already set.

    sync
        Pulls from the remote origin, then rebases the current
        branch on the previous numbered branch (or the "root" branch
        if on the first numbered branch).

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance66

Regular maintenance activity

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

202d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25754?v=4)[Paul M. Jones](/maintainers/pmjones)[@pmjones](https://github.com/pmjones)

---

Top Contributors

[![pmjones](https://avatars.githubusercontent.com/u/25754?v=4)](https://github.com/pmjones "pmjones (30 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/pmjones-daisy/health.svg)

```
[![Health](https://phpackages.com/badges/pmjones-daisy/health.svg)](https://phpackages.com/packages/pmjones-daisy)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
