npm-git-clone-no-history
v1.0.0
Published
Clone a git repo and reset the git history
Downloads
5
Maintainers
Readme
Git Clone No History
An npm script to clone a repository and reset the git history. This is done by removing the .git directory and then re-initializing a new git repository in the downloaded directory.
Usage:
Invoke the cli executable using either of the two commands:
gcnhgit-clone-no-history
The command takes two or three arguments:
<repo-url>Url to the git repository<repo-branch>OPTIONAL: Name of repository branch to clone<dir-name>Name of directory to clone the branch to
Example Usage:
# Clone the "py-project" repository into the "myDirectory" directory
gcnh [email protected]:username/my-project.git myDirectory
# Clone the "second-branch" branch from the "my-project" repository into the "myDirectory" directory
gcnh [email protected]:username/my-project.git second-branch myDirectoryOptions:
Use the -h or --help options after the command to print out a help message in the terminal.
# Prints out help message for the CLI application
gcnh -h