I've created a Laravel "boilerplate" project which contains my commonly used features/libraries.
What's the correct git process for utilising this boilerplate as a basis for new projects? I can think of two options:
boilerplate
to newproject
and begin. I don't have any intention of pulling newproject
changes back into boilerplate
.boilerplate
and update the remote origin to a new clean repo.I'm leaning towards the 2nd option, as it feels like a nice clean split from the boilerplate code. Will I be losing any cool git possibilities by doing this?
Update June 2019, 6 years later:
See "Generate new repositories with repository templates "
Sharing boilerplate code across codebases is a constant pattern in software development.
Bootstrapping a new project with our favorite tools and directory structures helps programmers go from idea to “Hello world!” more efficiently and with less manual configuration.Today, we’re excited to introduce repository templates to make boilerplate code management and distribution a first-class citizen on GitHub.
To get started, all you need to do is mark a repository as a template, and you’ll immediately be able to use it to generate new repositories with all of the template repository’s files and folders.
Every template repository gets a new URL endpoint called
/generate
that allows you to distribute your template more efficiently
Original answer 2013:
Considering you will be storing your project on Github from one of the templates included in boilerplate
GitHub project, I would:
boilerplate
, no need for a fork)boilerplate
in a separate location on your diskboilerplate
clone to your new locally cloned Github repogit add
, git commit
) Push that specific template back to your new Github repo.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With