Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git and SVN on Windows

Tags:

git

svn

msysgit

I'm trying to run git for my local repository and use SVN for my central repository to a CodePlex project. I downloaded the most recent version of msysgit, but the SVN support doesn't appear to be working.

The following successfully initializes a new empty repository and then gets stuck:

git svn init https://myproject.svn.codeplex.com
git svn fetch

After attempting to perform the fetch, I get the following:

Error validating server certificate for 'https://myproject.svn.codeplex.com:443'
:
 - The certificate is not issued by a trusted authority. Use the
   fingerprint to validate the certificate manually!
Certificate information:
 - Hostname: *.svn.codeplex.com
 - Valid: from May 23 02:11:05 2009 GMT until May 23 02:11:05 2010 GMT
 - Issuer: redmond, corp, microsoft, com
 - Fingerprint: f0:89:78:18:47:70:e4:dc:27:01:27:9c:6f:44:4c:3f:8a:9b:ad:79
(R)eject, accept (t)emporarily or accept (p)ermanently? p

As you can see, I try to permanently accept the certificate, but msysgit just sits and never performs the fetch.

Am I doing something wrong? Is the support not there? I found a similar Stack Overflow post from December. I'm not sure if the symptoms I'm experiencing are the same, or not.

like image 385
senfo Avatar asked Aug 06 '09 15:08

senfo


People also ask

Can I use Git and SVN at the same time?

You can clone a subversion repository to your machine using git svn clone <SVN repo URL> . The code will be available as a git repository. You can do your work there and make local commits as you please. There is a command line option to get a "shallow" checkout rather than the entire repository which is often useful.

Can I use Git on Windows?

Installing on WindowsThere are also a few ways to install Git on Windows. The most official build is available for download on the Git website. Just go to https://git-scm.com/download/win and the download will start automatically.

How do I find SVN in Windows?

SVN CheckoutOpen windows explorer. Create a folder where you will store project files. Right-click on the folder you created and select "SVN Checkout" (see image below). Enter the URL of your repository (something like "http://wiki.csc.calpoly.edu/307S07osos/svn").

Is Git and SVN same?

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.


2 Answers

git-svn does not work well on windows in my experience. What I would advise is to put your git import on something like github or any other git hosting, and use "pure" git on windows. This assumes you have a unix (or at worse cygwin, which should work better than msysgit I guess) to do the git-svn updates. That's not ideal, obviously.

like image 182
David Cournapeau Avatar answered Sep 22 '22 07:09

David Cournapeau


I'm not really sure why, but it takes a pretty long time to come back from the prompt above that asks whether or not to accept the certificate. After waiting about 15 minutes, the operation did complete.

like image 39
senfo Avatar answered Sep 22 '22 07:09

senfo