1

I would like to clone a starter project for a javascript application. The starter project contains pre-configurations for development and nice folder structures etc. I would be developing my app inside that folder structure. I will be committing the starter project and all my files to my own repo.

What I want to know is, can I keep the linkage to the startup project repo so I can pull any of their changes to (for example) the build config files?

I looked into git submodules but don't think that will work since I am making changes inside the "sub-project".

Ken Jae
  • 13
  • 2

1 Answers1

0

Submodule is indeed not appropriate here.
Branches are.

You are talking about a template project that you are modifying.

What you can do is to fork that project (or at least clone it and push it to your own new empty repo on a git repos hosting provider like GitHub or BitBucket)

That means:

  • the remote origin refers to your repo
  • you can add a new remote (named template for instance) which references the original template project.

This is a bit similar to the triangular workflow, except you won't contribute back through Pull Request to the "upstream" (here "template") repo:

https://cloud.githubusercontent.com/assets/1319791/8943755/5dcdcae4-354a-11e5-9f82-915914fad4f7.png

That way, you can git fetch template, and compare template/master with your own master, or even template/master and the previous template/master state (before the fetch), in order to detect any changes that you should incorporate into your current codebase.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250