1

I want to have a repository with the code base I will be using for most of my projects, but I'm not sure on how to deal with this.

All I can think of is to just clone it when I start a new project, and then remove the .git or .hg folder (and create it again for the versioning of the new project)

Is there a better way? Maybe something with submodules? The problem is that these files I need can't be in a separate folder, they are the core of the application, for example a Rails instance.

Is there a recommended way for doing this?

HappyDeveloper
  • 12,480
  • 22
  • 82
  • 117

1 Answers1

0

The recommended way would be using subrepositories.
This is the easiest solution for "core" files that are needed in each project.

However, a subrepository will be in a subfolder inside your main repository.
You said this:

The problem is that these files I need can't be in a separate folder, they are the core of the application, for example a Rails instance.

...so I'm not sure if subrepositories are a viable solution for you.

I don't know anything about Rails or about your application, so I can't tell if it's possible in your case to put your "core" files into a subfolder.

Community
  • 1
  • 1
Christian Specht
  • 35,843
  • 15
  • 128
  • 182