Re: Git / Subversion Interoperability

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

 




On Sat, 24 Mar 2007, Karl Hasselström wrote:
>
> There is a slight problem with directly converting between svn:ignore
> and .gitignore, though: the semantics are only almost the same.
> Specifically, git's ignore patters are recursive (applies to
> subdirectories) while subversion's are not. But it's not a big
> problem.

You should be able to use an "absolute" path-name to ignore something in 
.gitignore, in which case it is not used recursively.

So if your .gitignore looks like

	*.o

it means that it recursively ignores all *.o files starting at that level.

HOWEVER, if you write it as

	/*.o

it means that it ignores *.o files only *within* that level (so it's 
"absolute" wrt the particular .gitignore file, not globally).

So you can have both behaviours.

[ I think the exact behaviour is: if there is a '/' anywhere in the name, 
  it's not a recursive match and has to match the file exactly, but 
  somebody like Junio should probably back me up on that ]

		Linus

[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]