0

Sorry for the inexperienced question. What I essentially want to do is clone a Laravel starter project, use it as the basis for my own project and add it to my own GitHub private repository as a completely new project.

Via command line on my laptop I copied the remote repository

$ git clone git://github.com/andrewelkins/Laravel-4-Bootstrap-Starter-Site.git laravel

now when I try to add it to my own GitHub account it has the full list of past 4000 commits, over 200 contributors, etc. which I don't want.

So what is the best way via Git/Github to clone a starter project and add it to a private repository as though its 100% new? Is it best to clear all history (rm -rf .git), fork the project, or create a blank folder and grab the .zip of the project and copy it in?

john_ch
  • 103
  • 9

1 Answers1

0

Yeah, if you want to simply disconnect from the original repo, just blow away the .git directory as you propose, and treat it as a completely new project. You won't be able to merge changes from the original repo anymore but it sounds like you're fine with that.

~$ git clone git://github.com/andrewelkins/Laravel-4-Bootstrap-Starter-Site.git laravel
Cloning into 'laravel'...
remote: Counting objects: 25421, done.
remote: Total 25421 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (25421/25421), 12.94 MiB | 832.00 KiB/s, done.
Resolving deltas: 100% (12284/12284), done.
Checking connectivity... done.
~$ cd laravel/
~/laravel$ rm -rf .git
~/laravel$ git init
Initialized empty Git repository in /Users/wwheeler/laravel/.git/
~/laravel$ 

(Note that this will grab the latest development snapshot. If you need a specific release then you'll want to clone a specific tag.)

When you create a new repo on GitHub, it has the instructions for adding the remote and pushing your local repo up to GitHub so I won't repeat them here.

Community
  • 1
  • 1