从克隆存储库更新到我的服务器上的原始存储库
我确信我在这里做错了一些非常简单的事情,所以我制作了这些图表,希望有人能帮我弄清楚。基本上,我无法从克隆的存储库中获取任何新文件以显示在服务器上的原始存储库上。
目前,我的生产服务器上安装了 magento。我将其创建为 --bare --shared git 存储库,然后将其克隆到我的本地 mac git。
我了解如何在克隆存储库中暂存和提交,但我认为这都是本地的,包含提交在 mac 的存储库中,实际上并不接触服务器。
这是出了问题的地方,现在我的本地存储库处于我想要的状态,我是否将其推送到原始存储库?
然后,我假设我将在服务器上暂存并提交更改?
最后,我意识到这是一个非常基本的工作流程,但我想掌握这个布局现在,在我让事情变得更复杂之前。
谢谢。
I'm sure there's something very simple I'm doing wrong here, so I made these diagrams in the hope that someone can figure it out for me. Basically, I cannot get any new files from my cloned repo to show up on the original repo on the server.
Currently, I have a magento installation on my production server. I made this a --bare --shared git repository then cloned it to my local mac git.
I understand how to stage and commit within the clone repository, but I assume this is all local, the commits are contained within the mac's repository and don't actually touch the server.
This is where something is going wrong, now that I have my local repo in the state I want it, do I push it to the original repo?
Then, I assume I will stage and commit the changes on the server?
Last, I realize this is a very basic workflow, but I'd like to master this layout for now before I make things more complex.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在本地存储库中完成阶段并提交后,您必须推送到服务器:
其中 origin 是您要推送到的远程(克隆时自动设置),master 是您要推送的分支。
请注意,您推送的是提交而不是文件。所以一旦你推动了,你就完成了。您不必在服务器上进行暂存和提交。
After you have stage and committed in your local repo, you have to push to the server:
where origin is the remote you are pushing to ( automatically setup when you clone) and master is the branch you are pushing.
Note that you push commits and not files. So once you have pushed, you are done. You don't have to stage and commit on the server.