git-svn ¿no es un comando git?


Al intentar obtener un viejo volcado svn de un proyecto bajo el control de git, me encontré con un problema interesante. Cada vez que corro git svn, recibo un error diciendo que no es un comando git, sin embargo, hay documentación para ello que puedo extraer usando git help. ¿Hay algo mal con mi instalación, o simplemente me estoy perdiendo algo aquí?

Editar: Probablemente también debería mencionar que estoy ejecutando msysGit versión 1.6.1.9.g97c34 bajo Windows XP, y el error que obtengo es:

$ git svn 
git: 'svn' is not a
git-command. See 'git --help'.

Did you mean one of these?
        fsck
        show
Author: Cristián Romo, 2009-02-09

11 answers

No estoy seguro de que git svn haya trabajado alguna vez con la reciente distribución de Git Windows (post 1.5.6).

Muchos problemas han sido reportados antes, por lo que git svn puede no estar incluido en las versiones actuales de msysGit.

Otro desarrollo activo de "Git en Windows" mingw.git indica en su README que svn no funciona.

Este hilo de Msysgit sugiere que git svn puede ser reintegrado en algunos puntos, pero el progreso sigue siendo lento.


Actualización: desde MSysGit1.6.2 (principios de Marzo 2009), git-svn funciona de nuevo. Ver esto ASÍ pregunta.


Actualización: con un Git moderno (2017) para Windows 2.x, git svn ya está incluido.
No hay necesidad de sudo apt-get install git-svn, que solo sería posible en una sesión de shell WSL (Subsistema de Windows para Linux) de todos modos.

 17
Author: VonC,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-11-14 09:00:34

Acabo de comprobar en mi recién instalado ubuntu caja y no se instaló incluso con git-core instalado. Un simple:

sudo apt-get install git-svn

O su distro equivalente debería arreglarlo.

 233
Author: hacintosh,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-09-12 10:18:08

En Ubuntu:

sudo add-apt-repository ppa:git-core/ppa
apt-get update
sudo apt-get install git-svn
 24
Author: alexsaintx,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-02-03 19:39:03

Para la posteridad: En CentOS 7, simplemente ejecute sudo yum install git-svn.

 5
Author: Dave Gregory,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-12-22 10:06:54

Tuve el mismo error bajo Cygwin 1.7. Se resolvió instalando el paquete git-svn con la configuración de Cygwin.

 4
Author: Esko Luontola,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2009-05-21 22:17:17

Bajo mi sistema he tenido este problema:

$ git svn
Can't locate SVN/Core.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.10.0
/usr/lib/perl5/5.10.0/i486-linux-thread-multi
/usr/lib/perl5/5.10.0
/usr/lib/perl5/site_perl/5.10.0/i486-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.8
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.10.0/i486-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.10.0
/usr/lib/perl5/vendor_perl/5.8.8
/usr/lib/perl5/vendor_perl .) at
/usr/libexec/git-core/git-svn line 29.

Porque no tengo instalados enlaces Perl de Subversion. Intente instalarlos y ejecutar el comando de nuevo.

 4
Author: jfsantos,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-05-19 21:20:28

En Gentoo, deberías compilar git con USE = "subversion"

 2
Author: user1012316,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-12-11 09:17:33

Versión para MacPorts:

port install git +svn

(Nota: es probable que necesite port deactivate git primero)

 2
Author: merv,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-03-24 01:04:10

Si git-svn no es parte de mSysGit, recomiendo usar un pequeño servidor UNIX para alojar su repositorio gateway que clone su repositorio svn, y luego clonar ese repositorio en su máquina Windows. Este es el enfoque que estoy usando para interactuar con CVS desde git.

 1
Author: skiphoppy,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2009-04-01 14:57:54

Tuvo un problema similar en RHEL6, es decir,

No se Puede localizar Git/SVN.pm en @INC (@INC contiene: /usr/local/share/perl5 /usr/local/lib64/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at/usr/local/libexec/git-core / git-svn line 25.

Mi solución:

sudo yum install subversion-perl
chmod 755  /usr/local/share/perl5/ (and sub dirs, as they were only readable by root)
 1
Author: Rob,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-03-12 21:51:24

En Fedora tuve que instalarlo con

sudo dnf install -y git-svn
 0
Author: isapir,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-07-03 05:34:45