Re: [git-users] Clone sub-directory in the main repository

2015-10-07 Thread Magnus Therning
On Tue, Oct 06, 2015 at 08:51:38PM +0300, Konstantin Khomoutov wrote:
> On Tue, 6 Oct 2015 03:39:30 -0700 (PDT)
> Anand Aravind  wrote:
> 
> > I had pushed my code in the structure below:
> > 
> > Source:
> > 
> >Win32
> >Win64
> >Ubunutu64
> >Ubuntu32
> > 
> > I had to clone the code form Win32 Folder only.
> 
> That's impossible due to the data model of any distributed version
> control system: since all replicas of a repository must have the same
> data where it's really the same, the minimal unit of sharing history
> (pushing, fetching and -- by extension -- cloning) is a commit. Since
> any commit is a snapshot of the whole project, it's impossible to
> clone something which is just a part of it.
> 
> On the other hand, you might have fallen a victim of a popular
> syndrome of telling us your solution for a particular problem and
> asking about a way to implement it, rather than describing the
> original problem itself.

This is often called the XY Problem, see
.

Sorry for the noise, but I couldn't help myself.

/M

-- 
Magnus Therning  OpenPGP: 0xAB4DFBA4 
email: mag...@therning.org   jabber: mag...@therning.org
twitter: magthe   http://therning.org/magnus

Agile is our homeopathy.  Anything correct is entirely incidental.
 -- Tony Morris

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: PGP signature


Re: [git-users] Clone sub-directory in the main repository

2015-10-06 Thread Konstantin Khomoutov
On Tue, 6 Oct 2015 03:39:30 -0700 (PDT)
Anand Aravind  wrote:

> I had pushed my code in the structure below:
> 
> Source:
> 
>Win32
>Win64
>Ubunutu64
>Ubuntu32
> 
> I had to clone the code form Win32 Folder only.

That's impossible due to the data model of any distributed version
control system: since all replicas of a repository must have the same
data where it's really the same, the minimal unit of sharing history
(pushing, fetching and -- by extension -- cloning) is a commit.
Since any commit is a snapshot of the whole project, it's impossible to
clone something which is just a part of it.

On the other hand, you might have fallen a victim of a popular syndrome
of telling us your solution for a particular problem and asking about a
way to implement it, rather than describing the original problem itself.

What would be your real use case for such "partial" clone?
To put it another way: what do you want to achieve?

Are you seeking for minimizing the amount of bytes to be downloaded?
If yes, do you still need the whole history of changes touching the
Win32 subtree or are fine with just the latest slice of them?
Do you need to continue developing on that snapshot and pushing your
changes back or you just want to download that stuff for using it (say,
building) so your cloning operation would be a one-off gig?

Please consider all this stuff carefully before replying.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.