I have a subversion repository hosted on Linux but only ever accessed via windows clients as it's for the source of a large Windows application.
It would be awesome if I could work on this repository using git-svn (provided by msysgit).
I'm having a heck of a time trying to get the repository to not get itself in a jam over the windows style line endings.
After svn clone
a checkout of the git repository with:
core.autocrlf = true
shows modifications to any file which actually does use LF
in the repository.core.autocrlf = input
shows modifications to any file which actually does use LF
in the repository.core.autocrlf = false
shows modifications to everything.What's the best option here? Should I use core.autocrlf = true
and commit the LF
to CRLF
changes for affected files?
I'm very close to throwing in the towel and just putting my Subversion working copy into a git repository. This would be a poor solution but would at least allow local branches and stashes. It will obviously become a huge pain to keep adding files when they are added to subversion.
EDIT: For those who are interested. git-svn
is a royal pain if you are on Windows. hasen j's answer below is probably the right one but I can't follow his advice without attracting the ire of the other developers in my team.
I'm essentially abandoning this question since it isn't going to lead to a reasonable outcome. Hopefully the next Google Summer of Code will attract someone who wants to pickup their "Proper git-svn support on Windows" project. See http://git.or.cz/gitwiki/SoC2009Ideas#Propergit-svnsupportonWindows
SVN stands for Subversion. So, SVN and Subversion are the same. SVN is used to manage and track changes to code and assets across projects.
What is Git-SVN? The git-svn tool is an interface between a local Git repository and a remote SVN repository. Git-svn lets developers write code and create commits locally with Git, then push them up to a central SVN repository with svn commit-style behavior.
The difference between Git and SVN version control systems is that Git is a distributed version control system, whereas SVN is a centralized version control system. Git uses multiple repositories including a centralized repository and server, as well as some local repositories.
SVN also enables you to quickly retrieve versions of a code repository through the checkout process. While SVN doesn't support nested repositories, you can still retrieve and combine changes found in multiple code repositories into one working copy of the code using the command svn:externals.
Do yourself a favor and don't mess with line-endings, keep them as-is. set autocrlf
to false
.
Any half-decent text editor in windows should be able to handle unix-style line endings.
core.autocrlf = false shows modifications to everything.
I think that if you only do that after the fact, it won't do you any good.
You have to delete this repository, set autocrlf to false, and then do the clone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With