1

I am required to interface with SVN at work, but prefer to run Git locally to allow me to have multiple local branches open at any given time. After making the switch from Windows 7 to Linux Mint 15 (Olivia) Cinnamon, I'm finding that git-svn doesn't appear to be available for this release of Linux Mint.

So far, I've tried installing it from http://community.linuxmint.com/software/view/git-svn, but the install returns an error message:

    Package 'git-svn' is virtual

I can find no solution for this error.

I've also attempted to install it directly in a terminal window:

    sudo apt-get install git

While I successfully installed Git, it is not current (1.8.1.2 vs. 1.8.3.2) and this implementation of Git doesn't appear to have a "git svn" command, but does have a "git clone" command. This "git clone" command doesn't appear to have any ability to talk with SVN.

I have tried using the following:

    sudo git clone https://<username>@<domain>/svn/<projectname>/trunk <folder_to_checkout_to>

After providing the SVN server password, it attempts to clone the SVN repository, but returns with the following error:

   fatal: hhttps://<username>@<domain>/svn/<projectname>/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?

I don't know what this means. In searching on Google and StackOverflow, I've found that the SVN path may be bad or not exist, but I've verified the path is valid as I can access the same path by placing it in a browser and signing in.

I thought this error might be caused by the folder_to_checkout_to not existing yet, but when I create the folder and call a "git init" and then re-execute the git clone command above from the parent directory, it returns:

    fatal: destination path '<folder_to_checkout_to>' already exists and is not an empty directory

Using Mysysgit in Windows, the syntax that worked to clone and checkout an SVN repository using Git was as follows:

   git svn clone <path_to_repository> -T trunk <folder_to_checkout_to>/

With my install of Git on Linux Mint, it doesn't have the command "git svn" at all. Any help will be appreciated.

How do I get git-svn installed?

DrewShirts
  • 147
  • 1
  • 6
  • 19
  • This question should probably be moved to super user, but have you tried 'sudo apt-get install git-svn' – antlersoft Jul 09 '13 at 16:59
  • @antlersoft: Yes, I've tried it and this is the result: `Reading package lists... Done Building dependency tree Reading state information... Done Package git-svn is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'git-svn' has no installation candidate ` – DrewShirts Jul 09 '13 at 17:37

2 Answers2

2

Billy:

You can check this documentation:

If this doesn't works, try this method instead:

$which git
$sudo apt-get install git-core
$which git
/usr/bin/git
$git --version
Joel Hernandez
  • 2,195
  • 1
  • 13
  • 17
  • According to that URL, the last release was for Lisa (version 12). It mentions the url [http://git-scm.com/](http://git-scm.com/), but when attempting to download for Linux, it refers back to what I've already tried: apt-get install git – DrewShirts Jul 09 '13 at 17:02
  • It also mentions on [http://git-scm.com/downloads](http://git-scm.com/downloads) that you can get the latest developer release by cloning git from git: `git clone https://github.com/git/git.git`. Does that mean I could somehow compile the current development version and install it and somehow get git-svn installed that way? – DrewShirts Jul 09 '13 at 17:05
  • `sudo apt-get install git-core` returns `git-core is already the newest version.`. `which git` returns `/usr/bin/git`. `git --version` returns `git version 1.8.1.2`. – DrewShirts Jul 09 '13 at 17:22
  • According to [http://community.linuxmint.com/software/view/git-svn](http://community.linuxmint.com/software/view/git-svn) it was made available for both Lisa (12) and Isadora (9). I will check with the Ubuntu repositories. – DrewShirts Jul 09 '13 at 17:41
  • This looks promising: [http://www.ubuntuupdates.org/package/core/raring/universe/base/git-svn](http://www.ubuntuupdates.org/package/core/raring/universe/base/git-svn) – DrewShirts Jul 09 '13 at 17:46
  • This led me to the binary [https://launchpad.net/ubuntu/+source/git/1:1.8.1.2-1/+build/4275103/+files/git_1.8.1.2-1_amd64.deb](https://launchpad.net/ubuntu/+source/git/1:1.8.1.2-1/+build/4275103/+files/git_1.8.1.2-1_amd64.deb) which when I attempt to install through the GDebi Package Installer it reports `Error: no longer provides git`. – DrewShirts Jul 09 '13 at 18:03
  • It is not mandatory to use Linux Mint: It's just the flavor I've chosen to try out. The URL [http://www.ubuntuupdates.org/package/core/raring/universe/base/git-svn](http://www.ubuntuupdates.org/package/core/raring/universe/base/git-svn) also provided [http://security.ubuntu.com/ubuntu/pool/universe/g/git/git-svn_1.8.1.2-1_all.deb](http://security.ubuntu.com/ubuntu/pool/universe/g/git/git-svn_1.8.1.2-1_all.deb). – DrewShirts Jul 09 '13 at 18:29
  • Installing this package reported `Error: Dependency is not satisfiable: libyaml-perl`, so I found that that dependency at [http://packages.ubuntu.com/raring/libyaml-perl](http://packages.ubuntu.com/raring/libyaml-perl). The second install attempt of git-svn_1.8.1.2-1_all.deb reported `Error: Dependency is not satisfiable: libterm-readkey-perl`. – DrewShirts Jul 09 '13 at 18:29
  • I found that dependency at [http://packages.ubuntu.com/raring/libsvn-perl](http://packages.ubuntu.com/raring/libsvn-perl), but when installing it was told to download an updated package using the package installer. After doing so, the fourth install attempt of git-svn_1.8.1.2-1_all.deb succeeded. I used the same syntax as I did in Windows 7 and it worked flawlessly!!! Windows syntax: `git svn clone -T trunk /` – DrewShirts Jul 09 '13 at 18:30
0

Git is installed by default on mint 16 mate. use "git --version" to check.

Eric
  • 22,183
  • 20
  • 145
  • 196