On Nov 30, 12:31 pm, Orava <petri.m.wess...@gmail.com> wrote:

First of all, I recommend reading the relevant part of the Pro Git
book [1].


> - All the code will live in a central remote repository or
> repositories. I'll check out ("pull") code changes to my actual
> working copy repositories (on laptop or desktop) as needed, and push
> back changes periodically.

1) Setup "bare" remote repository, add it as the remote repository
  to the configuration of your local repository. It might be sensible
  to name it "origin" -- this will simplify mental difficulties of
  various tutorials to your own setup.

2) Create any number of local trees (it seems that for now you need
 one of them -- for your template code).

3) Push local trees to the remote side (`git push --mirror`), fetch
them back
  (`git fetch`), make your local trees track remote trees you have
just fetched.

Then you can work as if you cloned the remote repository.

> - I want to have a code template which I will use as the base for all
> new projects (it's Ruby on Rails code). That template will exists as a
> project of its own, and will contain shared functionality I want in
> all projects; user management, authentication, etc.
> - As noted, new projects will start off with a copy of the template,
> but then evolve into whatever app they need to be. Changes made to the
> app will generally only go into the app codebase, not the template.
> - *But* I also want to be able to merge in changes from the template
> at times (for example, if I change/fix the authentication code I want
> those changes propagated to all the apps too).

All you need to do is to fork each of your projects off the tree you
your template in.
Re-integration of the changes made into the template tree is done
using simple merging via `git merge`.

Junio C Hamano recently made a post on the philosophy of merging
which is a more pleasing to read than books or tutorials [2].
You might find it interesting.

1. http://progit.org/book/ch5-0.html
2. http://gitster.livejournal.com/42247.html


You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to