A command that clones a given branch of an existing git repo and puts the clone next to the existing repo.
Install the package globally using npm (compatible with Windows, Linux, and macOS):
npm install -g @hsalameh/gitclonegitclone [branch-name]Clone the current repository to a new directory named after the cloned branch. If a directory with that name already exists, a number is appended to make it unique. The new clone is placed in the parent directory of the current repository.
[branch-name]- Specify the branch to clone. If omitted, the current branch is cloned.
gitclone- Clone the current branch and append a number if the directory already exists.gitclone feature- Clone the 'feature' branch and append a number if the directory already exists.
- Cross-platform support (Windows, Linux, macOS).
- Automatically determines the repository root and parent directory.
- Provides meaningful error messages for common Git issues.
MIT