我在 Sourceforge 上开始了一个项目,主要是为了尝试它是如何工作的。这是项目的链接:https://sourceforge.net/projects/tachikomawall/ 但是将源代码推送到项目对我不起作用。我正在尝试为此目的使用 GIT。这是它返回的错误:
[18:09] matachi ~/Projects/htdocs/Tachikoma-Wall $ git push origin master
matachi@tachikomawall.git.sourceforge.net's password:
fatal: '/gitroot/tachikomawall/code' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
以下是我之前在终端中输入的一些行(我认为我没有忘记任何内容):
[17:57] matachi ~/Projects/htdocs/Tachikoma-Wall $ git init
[17:57] matachi ~/Projects/htdocs/Tachikoma-Wall $ git config user.name "MaTachi"
[17:58] matachi ~/Projects/htdocs/Tachikoma-Wall $ git config user.email "matachi@users.sourceforge.net"
[17:58] matachi ~/Projects/htdocs/Tachikoma-Wall $ git add .
[17:58] matachi ~/Projects/htdocs/Tachikoma-Wall $ git commit
[master (root-commit) 637d52b] first commit
5 files changed, 91 insertions(+), 0 deletions(-)
create mode 100644 README
create mode 100644 images/bg.png
create mode 100644 include/style.css
create mode 100644 index.html
create mode 100644 index.php
[18:08] matachi ~/Projects/htdocs/Tachikoma-Wall $ git remote add origin ssh://matachi@tachikomawall.git.sourceforge.net/gitroot/tachikomawall/code
[18:08] matachi ~/Projects/htdocs/Tachikoma-Wall $ git config branch.master.remote origin
[18:09] matachi ~/Projects/htdocs/Tachikoma-Wall $ git config branch.master.merge refs/heads/master
我猜根据错误消息我没有写正确的存储库名称。正如您可能理解的那样,我之前没有使用过 GIT,也并不真正了解它是如何工作的。
最佳答案
我遇到了同样的问题,并看到了对您问题的评论。
只是为了澄清:
关于 https://sourceforge.net/apps/trac/sourceforge/wiki/Git 的指南是 错误 。
不要从以下位置克隆/pull/推:
相反,从:
关于git - Sourceforge: "... does not appear to be a git repository",我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/7207852/