Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using SVN and Git side-by-side

I'm using SVN and Git to version-control the same folder, and am committing to 2 separate repositories; one hosted on Google Code and the other on GitHub, respectively.

SVN creates .svn directories in every directory that it tracks. When I add my files and folders to Git, I use globbing and simply glob the folder that I've modified in my working copy because there are lots of files and subdirectories in it, and I don't want to add them one by one.

I've tried adding */.svn/* to my .gitignore file, but to no avail. Is there any way of making Git and SVN coexist without the the clutter of SVN getting committed to the Git repo?

like image 485
Libbux Avatar asked Oct 22 '13 02:10

Libbux


1 Answers

All you should need to do is add .svn to your .gitignore file, without the extra slashes and stars. Or better, add it to .git/info/exclude which serves the same purpose for your own use and doesn't get committed to your repository.

like image 104
Greg Hewgill Avatar answered Nov 08 '22 01:11

Greg Hewgill