我已经在我的服务器上的适当文件夹(子域名根目录git.mydomain.com
)中使用以下命令设置了GIT仓库:
mkdir foo.git
cd foo.git
git init --bare --shared
这将使仓库通过URL
git.mydomain.com/foo.git
可用。在我的客户端上,尝试使用以下命令将提交的文件推送到服务器: mkdir foo
cd foo
git init
git remote add foo myUser@git.mydomain.com:foo.git
git add readme.txt
git commit -m "foo"
git push foo master
.. entering user password ..
仅返回以下结果:
fatal: 'foo.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
然而,按照不同的指南操作后,似乎我无法解决这个问题。如有建议,敬请赐教。请注意,我对GIT还不是很了解。