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

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

Git和GitHub不是一回事吗?


当前回答

Git和GitHub之间有很多明显的区别。

Git本身真正关注的是版本控制的基本任务。它维护一个提交历史,它允许您通过reset和revert命令来逆转更改,它允许您通过push和pull命令与其他开发人员共享代码。我认为这些是每个开发人员都希望从DVCS工具中得到的基本特性。

没有范围蠕变与Git

But one thing about Git is that it is really just laser focused on source code control and nothing else. That's awesome, but it also means the tool lacks many features organizations want. For example, there is no built-in user management facilities to authenticate who is connecting and committing code. Integration with things like Jira or Jenkins are left up to developers to figure out through things like hooks. Basically, there are a load of places where features could be integrated. That's where organizations like GitHub and GitLab come in.

其他GitHub功能

GitHub的主要“增值”是它为Git提供了一个基于云的平台。这本身就很棒。除此之外,GitHub还提供:

简单的任务跟踪 一个GitHub桌面应用程序 在线文件编辑 支路保护规则 拉请求特性 组织工具 冲动者的互动限制 emoji支持! !: octocat:: + 1:

因此,GitHub确实为已经流行的DVCS工具增加了润色和改进。

Git和GitHub的竞争对手

有时候,当谈到区分Git和GitHub时,我认为最好看看他们的竞争对手是谁。Git与Mercurial、Subversion和RTC等工具在同一平面上竞争,而GitHub则更多地在SaaS领域与GitLab和Atlassian的BitBucket等云供应商竞争。

不需要GitHub

我总是想提醒人们的一件事是,你不需要GitHub或GitLab或BitBucket来使用Git。Git是在2005年发布的吗?GitHub直到2007年或2008年才出现,所以在云托管供应商出现之前,大型组织就已经在使用Git进行分布式版本控制了。所以Git本身就很好。它不需要云托管服务才能有效。但与此同时,拥有PaaS提供商当然没有坏处。

使用GitHub Desktop

顺便说一下,你提到了你GitHub账户中的存储库和你在本地拥有的回购之间的不匹配?这是可以理解的。在你连接并进行拉取之前,本地Git回购不知道远程GitHub回购。话虽如此,GitHub提供了一个被称为GitHub桌面的工具,允许您从桌面客户端连接到GitHub,并轻松地将本地Git回购加载到GitHub,或将GitHub回购带到您的本地机器上。

我对这个工具没有太大的印象,因为一旦您了解Git,在Bash shell中完成这些事情就不是那么难了,但这是一个选项。

其他回答

说白了就是:

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

Git和GitHub之间有很多明显的区别。

Git本身真正关注的是版本控制的基本任务。它维护一个提交历史,它允许您通过reset和revert命令来逆转更改,它允许您通过push和pull命令与其他开发人员共享代码。我认为这些是每个开发人员都希望从DVCS工具中得到的基本特性。

没有范围蠕变与Git

But one thing about Git is that it is really just laser focused on source code control and nothing else. That's awesome, but it also means the tool lacks many features organizations want. For example, there is no built-in user management facilities to authenticate who is connecting and committing code. Integration with things like Jira or Jenkins are left up to developers to figure out through things like hooks. Basically, there are a load of places where features could be integrated. That's where organizations like GitHub and GitLab come in.

其他GitHub功能

GitHub的主要“增值”是它为Git提供了一个基于云的平台。这本身就很棒。除此之外,GitHub还提供:

简单的任务跟踪 一个GitHub桌面应用程序 在线文件编辑 支路保护规则 拉请求特性 组织工具 冲动者的互动限制 emoji支持! !: octocat:: + 1:

因此,GitHub确实为已经流行的DVCS工具增加了润色和改进。

Git和GitHub的竞争对手

有时候,当谈到区分Git和GitHub时,我认为最好看看他们的竞争对手是谁。Git与Mercurial、Subversion和RTC等工具在同一平面上竞争,而GitHub则更多地在SaaS领域与GitLab和Atlassian的BitBucket等云供应商竞争。

不需要GitHub

我总是想提醒人们的一件事是,你不需要GitHub或GitLab或BitBucket来使用Git。Git是在2005年发布的吗?GitHub直到2007年或2008年才出现,所以在云托管供应商出现之前,大型组织就已经在使用Git进行分布式版本控制了。所以Git本身就很好。它不需要云托管服务才能有效。但与此同时,拥有PaaS提供商当然没有坏处。

使用GitHub Desktop

顺便说一下,你提到了你GitHub账户中的存储库和你在本地拥有的回购之间的不匹配?这是可以理解的。在你连接并进行拉取之前,本地Git回购不知道远程GitHub回购。话虽如此,GitHub提供了一个被称为GitHub桌面的工具,允许您从桌面客户端连接到GitHub,并轻松地将本地Git回购加载到GitHub,或将GitHub回购带到您的本地机器上。

我对这个工具没有太大的印象,因为一旦您了解Git,在Bash shell中完成这些事情就不是那么难了,但这是一个选项。

通过简单的方式,我们可以看出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是一个版本控制系统,一个管理源代码历史的工具。

GitHub是Git存储库的托管服务。

所以它们不是一回事:Git是工具,GitHub是为使用Git的项目提供的服务。

要把你的代码放到GitHub上,请看这里。