clone-with-hash
Installation
SKILL.md
Clone With Hash
Overview
Create a fresh git clone in a unique -<hash> folder under a chosen parent directory (default: home), then check out a new branch from origin/main (or another base branch if specified).
Workflow
- Identify the source repo (local path or remote URL).
- Choose the parent directory (default:
~) and suffix length (default: 6). - Derive the base name from the repo path or URL (strip trailing
.git). - Generate a random hex suffix, build the destination path, and ensure it does not exist.
- Run
git clone <src> <dest>, thengit checkout -b <branch> origin/<base>. - Report the destination path and created branch.