10

There is a master subversion repository that I've cloned a git repo from. I've got a lot of ignored files in my .gitignore that I'd like the svn repository to know about.

I know that I can use git svn show-ignore to pull the ignored list from subversion, but how can I do the reverse? Send a list of files to be ignored back to the svn repo?

Git version (and git-svn is at the same version):

git --version 
git version 1.7.0.5
Enrico Campidoglio
  • 56,676
  • 12
  • 126
  • 154
Kzqai
  • 22,588
  • 25
  • 105
  • 137

3 Answers3

5

Ok, so one (annoying) method that I've found is to:

(convenience step) add the gitignore file to the repository so that it is tracked.

Do an svn checkout.

svn propedit svn:ignore ./

Add in all the stuff that's in the tracked gitignore file.

This is pretty ugly, though, and who likes to actually touch & checkout svn when you're working with git? Anyone have a better alternative?

Kzqai
  • 22,588
  • 25
  • 105
  • 137
1

Git svn does not support this, so you'd have to do it yourself on a separate svn checkout. From the manual:

We ignore all SVN properties except svn:executable

It would be really nice though if this wasn't the answer...

iwein
  • 25,788
  • 10
  • 70
  • 111
  • What does "so you'd have to script it yourself" mean? – Kzqai May 22 '10 at 21:09
  • @Tchalvak, it means you'd have to do what you said (which can be scripted or not). I'll edit that as it doesn't add value to the answer. – iwein May 26 '10 at 16:11
0

Yes, it is possible. Just install SubGit into your SVN repository. It acts like a concurrent-safe bridge and performs bidirectional translation (triggered by hooks). It translates SVN tags to Git tags, branches to branches, svn:ignores to .gitignore, svn:eol-style to "eol" and "text" attribute of .gitattirbutes, fully merged SVN branches to Git merge-commits; and vice versa.

Dmitry Pavlenko
  • 8,530
  • 3
  • 30
  • 38