Migration von Svn (Server Version 1.6.11) zu Git (Version 2.9.2) unter Windows 10 scheint nicht wie beschrieben zu funktionieren (Ich möchte alle Svn- Tags und Zweige).Migration von Svn zu Git 2.9.2 auf Windows
Erster Versuch:
Ich folgte dem Tutorial https://www.atlassian.com/git/tutorials/migrating-convert zur Verfügung gestellt.
Ergebnis: Alle Branchen werden gelöscht, wenn der folgende Befehl ausgeführt wird:
java -Dfile.encoding=utf-8 -jar ~/svn-migration-scripts.jar clean-git
--force
Nächster Versuch:
Ich folgte die bei https://git-scm.com/book/it/v2/Git-and-Other-Systems-Migrating-to-Git beschriebenen Schritten:
Kasse das Projekt:
git svn clone --stdlayout --authors-file=authors.txt --no-metadata http://<the-svn-url-without-trunk> <module-directory>
Nach dem Auschecken erzeugt der Befehl
git tag -l
eine leere Ausgabe.git branch -a
die folgende Ausgabe erzeugt (wie erwartet):*master remotes/origin/tags/de-vgwort-jerry-configuration-1.0.0 remotes/origin/tags/de-vgwort-jerry-configuration-1.0.1 remotes/origin/tags/de-vgwort-jerry-configuration-1.0.2 remotes/origin/tags/de-vgwort-jerry-configuration-1.1.0 remotes/origin/tags/de-vgwort-jerry-configuration-1.2.0 remotes/origin/tags/de-vgwort-jerry-configuration-1.3.0 remotes/origin/tags/de-vgwort-jerry-configuration-1.4.0 remotes/origin/tags/de-vgwort-jerry-configuration-1.4.1 remotes/origin/tags/de-vgwort-jerry-configuration-1.5.0 remotes/origin/trunk
Der nächste Schritt nach der Dokumentation:
To move the tags to be proper Git tags, run
$ cp -Rf .git/refs/remotes/origin/tags/* .git/refs/tags/
$ rm -Rf .git/refs/remotes/origin/tags
Das Problem:
The Pfad .git/refs/remotes/origin/tags/
ist leer. Alle SVN-Tags scheinen bei
.git/svn/refs/remotes/origin/tags
Das Verzeichnis werden .git/svn/refs/remotes/origin/tags
ein Unterverzeichnis für jeden Tag enthalten. Ich habe versucht, diese Verzeichnisse zu .git/refs/tags/
zu bewegen, aber dies führt zu der folgenden Ausgabe, wenn git branch -a
Ausführung:
warning: ignoring broken ref refs/tags/de-vgwort-jerry-configuration-1.0.0/index warning: ignoring broken ref refs/tags/de-vgwort-jerry-configuration-1.0.0/unhandled.log warning: ignoring broken ref refs/tags/de-vgwort-jerry-configuration-1.0.1/index warning: ignoring broken ref refs/tags/de-vgwort-jerry-configuration-1.0.1/unhandled.log warning: ignoring broken ref refs/tags/de-vgwort-jerry-configuration-1.0.2/index warning: ignoring broken ref refs/tags/de-vgwort-jerry-configuration-1.0.2/unhandled.log warning: ignoring broken ref refs/tags/de-vgwort-jerry-configuration-1.1.0/index warning: ignoring broken ref refs/tags/de-vgwort-jerry-configuration-1.1.0/unhandled.log warning: ignoring broken ref refs/tags/de-vgwort-jerry-configuration-1.2.0/index warning: ignoring broken ref refs/tags/de-vgwort-jerry-configuration-1.2.0/unhandled.log warning: ignoring broken ref refs/tags/de-vgwort-jerry-configuration-1.3.0/index warning: ignoring broken ref refs/tags/de-vgwort-jerry-configuration-1.3.0/unhandled.log warning: ignoring broken ref refs/tags/de-vgwort-jerry-configuration-1.4.0/index warning: ignoring broken ref refs/tags/de-vgwort-jerry-configuration-1.4.0/unhandled.log warning: ignoring broken ref refs/tags/de-vgwort-jerry-configuration-1.4.1/index warning: ignoring broken ref refs/tags/de-vgwort-jerry-configuration-1.4.1/unhandled.log warning: ignoring broken ref refs/tags/de-vgwort-jerry-configuration-1.5.0/index warning: ignoring broken ref refs/tags/de-vgwort-jerry-configuration-1.5.0/unhandled.log * master remotes/origin/tags/de-vgwort-jerry-configuration-1.0.0 remotes/origin/tags/de-vgwort-jerry-configuration-1.0.1 remotes/origin/tags/de-vgwort-jerry-configuration-1.0.2 remotes/origin/tags/de-vgwort-jerry-configuration-1.1.0 remotes/origin/tags/de-vgwort-jerry-configuration-1.2.0 remotes/origin/tags/de-vgwort-jerry-configuration-1.3.0 remotes/origin/tags/de-vgwort-jerry-configuration-1.4.0 remotes/origin/tags/de-vgwort-jerry-configuration-1.4.1 remotes/origin/tags/de-vgwort-jerry-configuration-1.5.0 remotes/origin/trunk
Weiter
Verwenden svn2git von https://github.com/nirvdrum/svn2git versuchen. Aber dieses Tool scheint auch nicht zu funktionieren. Nach dem Ausführen
svn2git <svn-url-without-trunk> --authors ..\authors.txt
den Befehl git branch -a
erzeugt die folgende Ausgabe:
* master remotes/svn/trunk
=> Dieses Ergebnis ziemlich nutzlos ist.
Was fehlt mir hier? Gibt es Dokumentation für Windows und die neueste Git-Version 2.9.2?
Danke, ich werde es versuchen. –
Subgit-Import funktioniert gut (und viel schneller als Git Svn). Danke für die Hilfe. –