Re: can anybody explain the following to a git noob?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 22 May 2009, Tim Uckun wrote:

> >
> > Did test_new contain ignored files?
> 
> No.  I put the entire transcript in the first email. I did not tell
> git to ignore anything and there were no .git directories in the test
> folder.

Obviously, there's more before the transcript started; otherwise, there 
would be nothing to import in the initial commit, and there certainly 
wouldn't be .git directories that came from nowhere. I don't think any 
version control system I know of likes having your initial import be of a 
directory with other working directories for the same system as 
subdirectories. (That is, Mercurial will be fine having git working 
directories in the import, but git won't, and Mercurial wouldn't be happy 
about having Mercurial working directories as subdirectories).

> 
> > In this case, when you checkout the
> > branch that does not have test_new, only the tracked files are removed;
> > the ignored (i.e untracked) files remain. Therefore, after the checkout
> > you still have a test_new directory.
> >
> 
> As far as I can tell all the files are tracked after I do a commit.
> 
> I can understand why it put the original test directory back when I
> changed to the master branch but I don't understand why it's missing a
> subdirectory.  I don't think the test_new directory should be in the
> master branch at all but I guess I can kind of sort of see why git
> might not remove it. What I can't understand at all is why it's
> missing subdirectories.

This tends to happen if, while on a different branch, you editted some 
files and left editor backups or compiled (maybe just-in-time) files in 
that directory. Then there are files in the directory that don't belong to 
any branch, since they're not source files.

It's also highly likely that what's missing is stuff you thought you 
imported initially, but did not actually import due to the confusion with 
it already being a git working directory.

	-Daniel
*This .sig left intentionally blank*
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]