我最近使用Eclipse向Git添加了一个新项目,但在我的GitHub帐户中没有看到该项目。

为什么它们有相同的帐户信息和不同的存储库?

Git和GitHub不是一回事吗?


当前回答

如果你想跨开发人员合作,Github是必需的。如果你是一个单独的贡献者,git就足够了,确保你定期备份你的代码

其他回答

说白了就是:

正如我们所知,它们都是源代码控制。 打个比方,如果Git是一台独立的计算机,那么GitHub就是一个计算机网络,通过带有铃铛和口哨的网络连接起来。 所以除非你打开一个GitHub账户,并明确告诉VSC或任何编辑器使用GitHub,否则你会看到你的源代码在上面,否则它们只在下面这里,你的本地Git。 GitHub在与VSC一起使用时使用Git来完成其操作。

在简单:

Git -是本地存储库。

GitHub -是中央存储库。

希望下面的图片能帮助你理解:

通过简单的方式,我们可以看出git和git hub和VSTS之间的区别。

git: - Treat git as a engine/technology to achieve source version control to our project. Unlike TFS (again a centralized source version control ) git is distributed version control technology. That means git it actually does not mandate to have any server. Through git technology we can make our own local machine as a source code repository not required to have a centralized server always(in large scale it can have Microsoft server to push and keep our project source code). But with SVN and TFS kind version control, it is mandatory that a server be associated with it.

例如,如果我是一个自由的开发人员,我直接向我的客户端报告,没有其他开发人员参与,我需要对我的代码进行版本控制,以回滚(任何版本)和提交我的代码,我没有预算购买服务器,我没有时间在我的机器上安装和使用其他服务器作为TFS服务器和TFS客户端。所以,最优的方法是安装git引擎,并使用我的本地机器作为git版本控制的存储库。

GitHub: - as I said previously git is a technology and used with some command / shell commands , ie git only doesn't have UI. GitHub is online product or online repository which uses git technology for their process and achieve version controls along with other functionalities like bug tracking,Project management, Support ticket management ..etc. In other words Git Hub is a wrapper build on git technology with a UI and other functionalities by other third party firm, it is actually a product owned by somebody or some group based on git technology , where as git is open source, and not marketable product.

VSTS: VSTS是微软用于在线存储库保持源代码版本控制的产品,可以作为git hub的替代方案。从它属于微软以来,VSTS既支持git技术,也支持TFS(tfvc团队基础版本控制)。因为TFS是另一个实现这种版本控制的微软老产品。我认为VSTS会逐渐抛弃TFS,因为git是这一领域的突出技术,而且它是开源的。

简单地说,Git是一个版本控制系统,允许您管理和跟踪源代码历史。GitHub是一个基于云的托管服务,可以让你管理Git存储库。如果你有使用Git的开源项目,那么GitHub是用来帮助你更好地管理它们的。

如果你想跨开发人员合作,Github是必需的。如果你是一个单独的贡献者,git就足够了,确保你定期备份你的代码