连接到一个空的颠覆存储库

Connect to an empty subversion repository

我正在尝试连接到提供给我的 URL 的存储库,以便我可以轻松地将文件推送到其中。我首先尝试使用 "git clone {url}" 克隆它,但显然它是 "Subversion rep." 并且处理方式不同。经过一番谷歌搜索后,我的理解是 svn 是 git 的替代品,但应该能够通过键入以 "git svn".[= 开头的命令来通过 git 使用 svn。 14=]

我已经成功克隆了它,但还没有成功推送任何东西。我在 windows 下工作,安装了 git,没有安装 svn,并使用 git bash 键入命令。

这是我试过的命令的确切顺序:

git svn clone <url>
git init
touch test.txt
git add test.txt
git commit test.txt
{wrote commit message}
git svn dcommit

那时,我收到以下消息

Migrating from a git-svn v1 layout...

Data from a previous version of git-svn exists, but

.git/svn

(required for this version (2.19.0.windows.1) of git-svn) does not exist.

Done migrating from a git-svn v1 layout

Unable to determine upstream SVN information from HEAD history.

再次尝试命令,我只得到 "Unable to determine upstream SVN information from HEAD history." 如果我尝试

git svn rebase

我明白了

Unable to determine upstream SVN information from working tree history

我该怎么办?请假定我对 git 的能力为零。我已经尝试了几个在线指南,和往常一样,发现它们难以理解,因此非常令人沮丧。

澄清一下,此存储库目前是空的。我只是想在将来使用它。我不需要将任何现有文件导入其中,如果我必须再次克隆它也没有问题。而且我会是唯一一个使用它的人,它只是为了备份。

而不是使用 git svn, it would be simpler, for a subversion repository, to use directly... subversion

那样的话,考虑到您的远程存储库无论如何都是一个 Subversion,您只处理 Subversion 而不是同时处理 Git 和 SVN。