[英]How do I create a Git workflow from my existing project on a web host to Github?
I'm new to the Git world but I realize that, since my programmer and I are going to be working on files at the same time, we need to establish a Git workflow. 我是Git领域的新手,但我意识到,由于我和我的程序员将同时处理文件,因此我们需要建立一个Git工作流程。 I have very minimal experience with Git from a 3 month project I did last year so I need help setting this up. 去年我做了一个3个月的项目,对Git的经验很少,因此我需要帮助进行设置。
Currently, I have an account at a web host where all the current project files exist. 目前,我在虚拟主机上有一个帐户,该帐户中存在所有当前项目文件。 I typically modify the files remotely using Coda connected to the server. 我通常使用连接到服务器的Coda远程修改文件。
We purchased a month of service at Github to create a private repository so that we can use the GUI feedback of Github to solve bugs using the pretty UI to see the diffs. 我们在Github上购买了一个月的服务来创建一个私有存储库,以便我们可以使用Github的GUI反馈通过漂亮的UI来查看差异以解决错误。
On the web host account, no Git repository is setup yet. 在Web主机帐户上,尚未设置任何Git存储库。 I do not completely understand how to transfer the files to Github but I assume I would need to create a repository on the web host account first and then push this to the Github account. 我不完全了解如何将文件传输到Github,但是我想我需要先在Web主机帐户上创建一个存储库,然后再将其推送到Github帐户。
Does this sound correct? 这听起来正确吗? Which account would we set as the master repository? 我们将哪个帐户设置为主数据库? Beyond what I wrote, I am not sure I completely understand how to do every or if there's a better way to do what I've explained. 除了我写的内容,我不确定我是否完全理解如何做每一件事,或者是否有更好的方法来完成我所解释的事情。
I'd appreciate your feedback and if possible someone to write explicit instructions on how to do this. 非常感谢您的反馈,如果可能的话,有人会写出明确的说明。 Thanks! 谢谢!
When working with GitHub repo, you have two choices: 使用GitHub存储库时,有两种选择:
Since we are talking private repo, the first solution is more practical (to avoid having to setup different private, ie not free, repos for each developers). 由于我们正在谈论私有存储库,因此第一个解决方案更加实用(避免为每个开发人员设置不同的私有存储库,即非免费存储库)。
From there you need to setup a branch/merge workflow decide if you want, for a given development effort where several people work on the same set of files, if: 对于给定的开发工作,您需要从那里建立一个分支/合并工作流,以决定是否要由多个人处理同一组文件,如果满足以下条件:
(see also " when should you branch? " and the second part of " Why uses git fast-forward merging per default? ") (另请参阅“ 何时分支? ”和“ 为什么默认使用git快速转发合并的第二部分? ”)
Here's a great guide on github: 这是关于github的出色指南:
http://help.github.com/create-a-repo/ http://help.github.com/create-a-repo/
I'd download the content from the web host first, so you have everything locally, and then push up to github. 我将首先从Web主机下载内容,这样您就可以在本地拥有所有内容,然后再推送到github。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.