git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Alternate .gitignore
@ 2010-10-08 12:31 Maaartin
  2010-10-08 12:45 ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 4+ messages in thread
From: Maaartin @ 2010-10-08 12:31 UTC (permalink / raw)
  To: git

I'm using git for a project, where I'd like to store not only the sources but 
some quite large generated files, too. However, I'd like to keep them separated, 
so my source depository doesn't grow too much. The problem could be solved 
nicely if there was a possibility to use .gitignore for the source tree and let 
say .gitignore2 for the extended tree. I'd use two depositories: .git and .git2.

The content if .gitignore2 could be a subset of the content of .gitignore, so 
the extended tree would contain the sources as well, which is not really a 
problem. Or maybe I could make the depositories disjoint, I'm not sure now.

Is something like this possible or is it too strange requirement?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Alternate .gitignore
  2010-10-08 12:31 Alternate .gitignore Maaartin
@ 2010-10-08 12:45 ` Ævar Arnfjörð Bjarmason
  2010-10-08 21:39   ` Maaartin
  0 siblings, 1 reply; 4+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2010-10-08 12:45 UTC (permalink / raw)
  To: Maaartin; +Cc: git

On Fri, Oct 8, 2010 at 12:31, Maaartin <grajcar1@seznam.cz> wrote:
> I'm using git for a project, where I'd like to store not only the sources but
> some quite large generated files, too. However, I'd like to keep them separated,
> so my source depository doesn't grow too much. The problem could be solved
> nicely if there was a possibility to use .gitignore for the source tree and let
> say .gitignore2 for the extended tree. I'd use two depositories: .git and .git2.
>
> The content if .gitignore2 could be a subset of the content of .gitignore, so
> the extended tree would contain the sources as well, which is not really a
> problem. Or maybe I could make the depositories disjoint, I'm not sure now.
>
> Is something like this possible or is it too strange requirement?

Have you looked into storing your binaries in a git-submodule(1) ?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Alternate .gitignore
  2010-10-08 12:45 ` Ævar Arnfjörð Bjarmason
@ 2010-10-08 21:39   ` Maaartin
  2010-10-08 21:45     ` Kevin Ballard
  0 siblings, 1 reply; 4+ messages in thread
From: Maaartin @ 2010-10-08 21:39 UTC (permalink / raw)
  To: git

Ævar Arnfjörð Bjarmason <avarab <at> gmail.com> writes:

> Have you looked into storing your binaries in a git-submodule(1) ?

I've look at it just now and it doesn't seem to be the thing I need. According 
to my very basis understanding submodules seem to be useful for embedding other 
projects, but I'm working with a single project only. I'm speaking about a 
single project and need to store it in different repositories at different 
"ignorance levels".

To make it clear, just imagine that compilation would be many thousand times 
slower. In such a case you could prefer to store the history of the *.o files as 
well, but you'd still want to avoid the pollution of the source tree. So you'd 
maybe use .git for the sources as usually and .git2 (or whatever) for the object 
files (maybe together with the sources). This comes very close to my situation.

I could switch to using .git2 using $GIT_DIR, but with "*.o" in my .gitignore I 
see no way how to include the ignored files. Maybe I could use $GIT_DIR/info/
exclude somehow instead of .gitignore, but this could be quite cumbersome.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Alternate .gitignore
  2010-10-08 21:39   ` Maaartin
@ 2010-10-08 21:45     ` Kevin Ballard
  0 siblings, 0 replies; 4+ messages in thread
From: Kevin Ballard @ 2010-10-08 21:45 UTC (permalink / raw)
  To: Maaartin; +Cc: git

On Oct 8, 2010, at 2:39 PM, Maaartin wrote:

> Ævar Arnfjörð Bjarmason <avarab <at> gmail.com> writes:
> 
>> Have you looked into storing your binaries in a git-submodule(1) ?
> 
> I've look at it just now and it doesn't seem to be the thing I need. According 
> to my very basis understanding submodules seem to be useful for embedding other 
> projects, but I'm working with a single project only. I'm speaking about a 
> single project and need to store it in different repositories at different 
> "ignorance levels".
> 
> To make it clear, just imagine that compilation would be many thousand times 
> slower. In such a case you could prefer to store the history of the *.o files as 
> well, but you'd still want to avoid the pollution of the source tree. So you'd 
> maybe use .git for the sources as usually and .git2 (or whatever) for the object 
> files (maybe together with the sources). This comes very close to my situation.
> 
> I could switch to using .git2 using $GIT_DIR, but with "*.o" in my .gitignore I 
> see no way how to include the ignored files. Maybe I could use $GIT_DIR/info/
> exclude somehow instead of .gitignore, but this could be quite cumbersome.

Submodules are usually used to embed other projects, but they can also be used for this "ignorance levels" thing you want. Make the core repo have what everyone wants, and each "ignorance level" should go into another submodule. Lots of binary files that only some people need? Make it a submodule. People can then init the submodules they care about and update just those ones and ignore the others. You'll probably want to have some sort of documentation telling people what the different submodules are, so they don't just blindly `git submodule update --init --recursive`, but with just a little bit of effort it can work pretty well.

-Kevin Ballard

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-08 21:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-08 12:31 Alternate .gitignore Maaartin
2010-10-08 12:45 ` Ævar Arnfjörð Bjarmason
2010-10-08 21:39   ` Maaartin
2010-10-08 21:45     ` Kevin Ballard

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).