A Go CLI that allows multiple separate git repositories to act as a single monorepo by managing git state across repositories in sync.
go install github.com/willnewby/mergeish/cmd/mergeish@latestjust release-localThis builds the binary and installs it to ~/bin/.
- Initialize a workspace:
mergeish init- Edit
mergeish.ymlto add your repositories:
repos:
- url: git@github.com:org/backend.git
path: services/backend
- url: git@github.com:org/frontend.git
path: services/frontend
- url: git@github.com:org/shared-lib.git
path: libs/shared
settings:
default_branch: main
parallel: true- Clone all repositories:
mergeish clone- Work with your repos as a unified workspace:
mergeish status # See status of all repos
mergeish branch feature-x # Create branch on all repos
mergeish commit -am "msg" # Commit changes across repos
mergeish push # Push all reposInitialize a new mergeish workspace by creating a mergeish.yml config file.
mergeish init
mergeish init --config path/to/config.ymlClone all configured repositories into the workspace.
mergeish cloneShow status of all repositories including current branch, ahead/behind counts, and uncommitted changes.
mergeish statusExample output:
services/backend:
branch: main (↑2 ↓1)
changes: 3 file(s)
M src/api.go
A src/new.go
?? untracked.txt
services/frontend:
branch: main
changes: none
Pull latest changes from remote for all repositories.
mergeish pull
mergeish pull --rebasePush commits to remote for all repositories.
mergeish push
mergeish push --force # Requires confirmationManage branches across all repositories.
mergeish branch # List current branch for all repos
mergeish branch feature-x # Create and switch to new branch
mergeish branch --checkout feature-x # Switch to branch (creates if missing)
mergeish branch -d feature-x # Delete branch from all reposThe --checkout flag will create the branch in any repo where it doesn't exist.
Create a commit across all repositories with staged changes.
mergeish commit -m "Add new feature"
mergeish commit -a -m "Fix bug" # Stage all changes firstOnly repos with staged changes will have commits created.
Configuration is stored in mergeish.yml:
repos:
- url: git@github.com:org/repo.git # Git URL (SSH or HTTPS)
path: local/path # Local path relative to config file
settings:
default_branch: main # Default branch name (default: main)
parallel: true # Run operations in parallel (default: true)All commands support:
-c, --config <path>- Path to config file (default: searches formergeish.ymlin current and parent directories)
- Go 1.21+
- just (optional, for task running)
- goreleaser (optional, for releases)
just build # Build binary
just test # Run tests
just fmt # Format code
just lint # Run linter
just clean # Clean build artifactsjust snapshot # Build snapshot release
just release-local # Build and install to ~/bin
just release # Full release (requires GITHUB_TOKEN)MIT