Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a new project from a project skeleton using git

Tags:

git

In order to get a new django project up and running faster, I'd like to maintain a separate "project skeleton" on which I base all my new projects. It would be great if, as I improved the skeleton, I could bring those improvements into my active projects. How can I accomplish this with git?

So, maybe in my remote git repository machine I would have 1 repo for each project and one for the skeleton?

  • proj-A-repo
  • proj-B-repo
  • skeleton-repo

If I want to create a new proj-C locally based on the skeleton, then push my local changes up to the remote server in a new repo called proj-C-repo, how might I do this?

I've read through quite a bit of git documentation, but I'm confused about how to go about this. Do I need to clone the skeleton, or create an empty repo and then track a remote branch, or something else?

like image 807
asciitaxi Avatar asked Apr 24 '10 08:04

asciitaxi


1 Answers

This is exactly what git (or any DVCS) is good at. Give the skeleton its own repo; to create a new project you'd typically clone the skeleton onto your workstation, work away, then push to a different location (e.g. myserver:repo-C). If you later improve the skeleton and push changes to it, you can work them into an existing project with git pull myserver:skeleton and then merging.

like image 61
crazyscot Avatar answered Oct 28 '22 12:10

crazyscot