From: Enrico Weigelt <weigelt@metux.de>
To: git@vger.kernel.org
Subject: Re: Looking for a way to set up Git correctly
Date: Thu, 11 Nov 2010 14:25:02 +0100 [thread overview]
Message-ID: <20101111132502.GB23423@nibiru.local> (raw)
In-Reply-To: <BD94CB4FDD0C4462804E316F814A3CCA@denny>
* Dennis <denny@dennymagicsite.com> wrote:
Hi,
> Now, this can be either really simple or really complicated. My first
> question is: how do I set the repository up in the proper way where I
> could work on all 3 projects separately, with additional possibility of
> working on branch1 only and later committing my changes to branch2 and
> branch3.
As first step you could create 3 separate git repos in each directory
and add everything to it (git init, git add -A, git commit). Then
rename the branches properly (so instead of "master", they'll be called
"branch1", "branch2", "branch2" or something like that). Create another
(maybe bare) repo elsewhere, add it as remote to the three other ones
and push their branches upwards. Now you have 4 repos, 3 for working
on the individual branches and another for collecting them all (hub model).
You could also choose to throw the first three away and only work in
the last one.
> (Since projects are virtually identical, a fix in one branch
> usually needs to be propagated to other branches)
In your case, cherry-pick might be the right for you.
You could also do a little bit refactoring, making a 4th branch which
the other 3 are then rebased onto. Then you could do your fixes in that
branch and merged into or rebase the other 3 onto that one.
> My second question is that each branch has a huge folder with image data.
> By huge I mean 1 to 4Gb, depending on the branch. Since images are not
> directly relevant to the development work, is there a way to not include
> those folders in git?
see .gitignore file.
nevertheless it might be useful to also have all the images in the
repo for backup reasons.
BTW: if you're concerned about disk space, you could add the object dir
of the 4th (hub) repository to the 3 working repos (run git-gc in the
hub repo before that!). Next gc runs will remove the objects that are
already present in the hub. But beware! If you remove something in the
hub repo and run git-gc there, you could loose objects in the other repos!
(maybe it would be wise to add the 3 working repos as remotes in the
hub and always run an git remote update before git-gc in the hub).
cu
--
----------------------------------------------------------------------
Enrico Weigelt, metux IT service -- http://www.metux.de/
phone: +49 36207 519931 email: weigelt@metux.de
mobile: +49 151 27565287 icq: 210169427 skype: nekrad666
----------------------------------------------------------------------
Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------
next prev parent reply other threads:[~2010-11-11 13:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-11 3:25 Looking for a way to set up Git correctly Dennis
2010-11-11 9:38 ` Alex Riesen
2010-11-11 13:25 ` Enrico Weigelt [this message]
2010-11-11 16:46 ` Jonathan Nieder
[not found] ` <20101111190724.00vcimqm8w0cw8s0@dennymagicsite.com>
2010-11-11 19:38 ` Jonathan Nieder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101111132502.GB23423@nibiru.local \
--to=weigelt@metux.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).