Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exclude .svn folders within git

Tags:

git

svn

I'm trying to exclude subversion's folders from being tracked by git. I tried a couple different setups for .git/info/exclude, but it doesn't seem to work. I would use git-svn, but it's a pain to request access to get that to work, so I'd rather just work around this by excluding the folders.

I want to exclude ".svn/entries"

I've tried adding the following lines to .git/info/exlude: .svn entries .svn/entries entries svn

No matter what I try, .svn entries shows up when I run git status

like image 783
johannix Avatar asked May 04 '09 20:05

johannix


People also ask

What are .SVN folders?

In particular, each directory in your working copy contains a subdirectory named . svn, also known as the working copy's administrative directory. The files in each administrative directory help Subversion recognize which files contain unpublished changes, and which files are out of date with respect to others' work.

Where is .SVN folder?

- the only . svn folder is in the root folder now, and this contains all of the info for the checkout. You should now be able to simply copy the folder and check it in.

Can I use Git and SVN at the same time?

No interaction between them. Just ignore the . git folder for SVN and the . svn folder for Git and you should be fine.


2 Answers

I think you want to use a .gitignore file in your top-level directory. This will work if you put ".svn/entries" on a line in that file. You might just put ".svn" instead of ".svn/entries" as well.

EDIT: See comments. If they files are already being tracked by git, they'll always show up in git status.

like image 142
Jesse Rusak Avatar answered Oct 11 '22 13:10

Jesse Rusak


This thread has the correct answer:

Git - Ignore certain files contained in specific folders

What you really need is:

.svn* 
like image 45
RoloDMonkey Avatar answered Oct 11 '22 13:10

RoloDMonkey