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".
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:
origin
refers to your repotemplate
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:
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.