简体   繁体   English

使用 GIT 服务器(Windows),无法在 GIT 服务器中克隆回来

[英]Using GIT Server(Windows), Not able to Clone back in GIT Server

I am running a Git Windows server.我正在运行 Git Windows 服务器。 I am trying to access files locally on a Windows machine.我正在尝试在 Windows 机器上本地访问文件。 I successfully cloned the bare repo from remote to local, but when I try to push a locally created committ, the new files do not show up on the remote server.我成功地将裸仓库从远程克隆到本地,但是当我尝试推送本地创建的提交时,新文件不会显示在远程服务器上。 There is no error message.没有错误信息。

I created a bare repo on a remote server:我在远程服务器上创建了一个裸仓库:

/path/demo.git 

I cloned successfully locally with this command:我使用以下命令在本地成功克隆:

git clone ssh://username@IP:/path/demo.git

Please tell me how to push commits from the local repository to the remote repository.请告诉我如何将提交从本地存储库推送到远程存储库。

When you run git clone you automatically get origin as a remote referencing the path to the repository you cloned.当您运行git clone时,您会自动获取origin作为远程引用您克隆的存储库的路径。

You can ensure that you push implicitly to the same remote branch through configuration:您可以确保通过配置隐式推送到同一个远程分支:

git config --global push.default current

Then create some commits and run git push .然后创建一些提交并运行git push

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM