Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在考虑使用 git 进行源代码管理。我对是否应该使用 git 设置 ubuntu 服务器还是只使用 github 有点困惑?使用 github 真的有什么好处吗?另外,如果生产服务器没有安装 git,你将如何将代码从 git(或 github)部署到生产服务器?我是否必须在 php 中编写某种部署脚本(使用 ftp 函数)或使用 shell 脚本?
谢谢
Git 根本不需要服务器来运行。您可以将其安装在本地计算机上,创建存储库并开始使用它。
远程 git 安装(您可以在您自己的远程服务器上或 github.com 免费提供)只需要创建您的 git 存储库的远程副本(如果您要从多个位置进行编程,或者如果您想与世界分享您的源代码历史)
github 的优势——公共 repos 是免费的,它有适用于 Windows 和 Mac 的 GUI 客户端(不了解 Linux)。
将代码部署到生产服务器是完全不同的事情——它与 git 无关。无需在生产服务器上安装 git。