Have you ever needed a Git branch with zero history — one that doesn’t track main
or master
or pull in unrelated changes?
Say hello to git-newroot
— a CLI tool that creates clean orphan branches in seconds.
🔧 Why Use This?
Sometimes, you want a branch that:
- Doesn’t inherit any commits from
main
- Is used for static sites (
gh-pages
), demos, or release snapshots - Won’t confuse GitHub with “main is behind” messages
That’s where an orphan branch comes in — and git-newroot
makes it dead simple to create.
📦 Install (or use instantly)
# Global install
npm install -g git-newroot
# OR run it instantly without installing
npx git-newroot
# OR even better
git-newroot
⚙️ Usage
git-newroot [branch-name]
If no name is given, it defaults to version-1
Pushes to remote automatically if configured
🧪 Example:
git-newroot version-2
➡️ Creates a new version-2 branch with no history, adds a README.md, commits it, and pushes it (if a remote exists).
🎥 Demo
Check out the full usage demo on GitHub:
👉 https://github.com/Ethern-Myth/git-newroot-demo
For package information:
https://www.npmjs.com/package/git-newroot
🔁 Real-world Use Cases
🔄 Start over clean on a new idea
🚀 Deploy static sites with a fresh branch
🔒 Keep feature branches isolated from history
🧪 Prototype freely without
main
ormaster
pollution
Give it Try and walk away from manually recreating new branches.
Top comments (0)