0

I have created a framework that I would like to base all of my projects off of.

It would be nice if I could git clone it into a new project with out all of the git info.

Is my only solution to delete the .git folder after I clone?

Thanks

user564448
  • 365
  • 3
  • 9

2 Answers2

0

It seems that you're looking for git submodules, which allow your solutions to include projects hosted by another repository. So, basically, you should just add a submodule (referring to the repository your framework is hosted by) to the repository containing your project based off your framework.

penartur
  • 9,654
  • 5
  • 37
  • 48
0

If you don't want the .git then you have to either clone and delete and use the git archive command's remote option to directly get the contents of the repo ( while piping it and untar it).

If you are more flexible, git submodules is meant for this purpose, but it will be equivalent to cloning a repo, but the submodules information will be tracked in the root repo and anyone cloning the repo will be able to get the submodules.

manojlds
  • 275,671
  • 58
  • 453
  • 409