Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 1.27 KB

Readme.md

File metadata and controls

24 lines (19 loc) · 1.27 KB

Start a new project from a git Repository

I have a variety of "starter kit" repositories for various project types. When I clone those, the history of the starter kit comes with the repository, and I don't want that. This script gives me a clean new project. It does the following steps:

  1. Gives you a prompt indicating you should be at the parent folder of where you want the project created
  2. A second prompt requests the link to the remote repo. This link is the string that goes into the git clone command. In a tool like GitHub where it's the string, it provides via the clipboard icon. It can be in any form supported by git clone.
  3. Prompts for the name of the target folder that will be the root of the project
  4. clones the head of the repository specified into the folder specified
  5. moves into the new project folder
  6. removes the .git folder (and all children)
  7. runs git init
  8. runs git add .
  9. runs git commit - m "initial commit" THE END

Installation/Use

This project you can just clone directly. Feel free to throw away the .git folder. I like to store this at the root of my node development folder. You will need to make the script executable so from the terminal

chmod +x start-new-project.sh
## to run it then just
./start-new-project.sh