* How can I track a template?
@ 2008-09-07 16:04 Mike Sharov
2008-09-07 19:35 ` Andreas Ericsson
0 siblings, 1 reply; 2+ messages in thread
From: Mike Sharov @ 2008-09-07 16:04 UTC (permalink / raw)
To: git
I am trying to create a standard module to be included into many
projects. Specifically, the build system skeleton, but I have other uses
for the same mechanism. The idea is to have a repository with the
skeleton itself, and have other projects include it somehow and keep
up-to-date by pulling from the template repository.
The straightforward approach of using 'git pull' does not work very
well. At each merge, all the things changed show up. For example, I
would change the project name in the configure template. This change
creates a merge conflict on every pull even if that particular line did
not change in the template. Somehow it just doesn't seem to establish a
base for the merges. Another problem is that the tags get pulled and
become tags on the project, which is undesirable.
What sort of a solution would you recommend for this, if any?
--
Mike Sharov
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How can I track a template?
2008-09-07 16:04 How can I track a template? Mike Sharov
@ 2008-09-07 19:35 ` Andreas Ericsson
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Ericsson @ 2008-09-07 19:35 UTC (permalink / raw)
To: Mike Sharov; +Cc: git
Mike Sharov wrote:
> I am trying to create a standard module to be included into many
> projects. Specifically, the build system skeleton, but I have other uses
> for the same mechanism. The idea is to have a repository with the
> skeleton itself, and have other projects include it somehow and keep
> up-to-date by pulling from the template repository.
>
> The straightforward approach of using 'git pull' does not work very
> well. At each merge, all the things changed show up. For example, I
> would change the project name in the configure template. This change
> creates a merge conflict on every pull even if that particular line did
> not change in the template. Somehow it just doesn't seem to establish a
> base for the merges. Another problem is that the tags get pulled and
> become tags on the project, which is undesirable.
>
> What sort of a solution would you recommend for this, if any?
Enable rerere, the merge resolution recorder/replayer.
Pull from skeleton repo with --no-tags, and remove the tag-fetching
refspec from your .git/config (note that everyone has to do it, but
if only you integrate the updated skeleton that won't be a problem).
Or unconditionally include a project.mak (or some such) from the build
skeleton which sets all the project-specific details.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-07 19:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-07 16:04 How can I track a template? Mike Sharov
2008-09-07 19:35 ` Andreas Ericsson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).