![github有什么作用](https://i-blog.csdnimg.cn/blog_migrate/85d02312918aab0fa081dfcc98ba9822.png)
github有什么作用
![](https://i-blog.csdnimg.cn/blog_migrate/ae87de804dc60453f94d16ea7154b9b8.png)
GitHub is a website and service that we hear geeks rave about all the time, yet a lot of people don’t really understand what it does. Want to know what all the GitHub hubbub is about? Read on to find out.
GitHub是一个网站和服务,我们一直听到极客的狂热,但很多人并不真正了解它的作用。 是否想知道GitHub hubbub的全部内容? 请仔细阅读,找出答案。
GitHub中的“ Git” (The “Git” in GitHub)
To understand GitHub, you must first have an understanding of Git. Git is an open-source version control system that was started by Linus Torvalds—the same person who created Linux. Git is similar to other version control systems—Subversion, CVS, and Mercurial to name a few.
要了解GitHub,您必须首先了解Git。 Git是一个开放源代码版本控制系统,由Linus Torvalds(创建Linux的人)启动。 Git是类似于其他的版本控制系统- 颠覆 ,CVS和Mercurial仅举几例。
So, Git is a version control system, but what does that mean? When developers create something (an app, for example), they make constant changes to the code, releasing new versions up to and after the first official (non-beta) release.
因此,Git是一个版本控制系统,但这意味着什么? 当开发人员创建某些内容(例如,应用程序)时,他们会不断更改代码,直到第一个正式(非Beta版)发布之前和之后都会发布新版本。
Version control systems keep these revisions straight, storing the modifications in a central repository. This allows developers to easily collaborate, as they can download a new version of the software, make changes, and upload the newest revision. Every developer can see these new changes, download them, and contribute.
版本控制系统保持这些修订的直接性,将修改存储在中央存储库中。 这使开发人员可以轻松地进行协作,因为他们可以下载软件的新版本,进行更改并上载最新的修订版。 每个开发人员都可以看到这些新更改,下载并做出贡献。
Similarly, people who have nothing to do with the development of a project can still download the files and use them. Most Linux users should be familiar with this process, as using Git, Subversion, or some other similar method is pretty common for downloading needed files—especially in preparation for compiling a program from source code (a rather common practice for Linux geeks).
同样,与项目开发无关的人仍然可以下载文件并使用它们。 大多数Linux用户应该熟悉此过程,因为使用Git,Subversion或其他类似方法下载所需文件非常普遍-尤其是在准备从源代码编译程序时(对于Linux极客而言这是相当普遍的做法)。
Git is the preferred version control system of most developers, since it has multiple advantages over the other systems available. It stores file changes more efficiently and ensures file integrity better. If you’re interested in knowing the details, the Git Basics page has a thorough explanation on how Git works.
Git是大多数开发人员首选的版本控制系统,因为与其他可用系统相比,它具有多个优点。 它更有效地存储文件更改,并更好地确保文件完整性。 如果您有兴趣了解详细信息,请在Git基础页面上全面了解Git的工作原理。
GitHub中的“ Hub” (The “Hub” in GitHub)
We’ve established that Git is a version control system, similar but better than the many alternatives available. So, what makes GitHub so special? Git is a command-line tool, but the center around which all things involving Git revolve is the hub—GitHub.com—where developers store their projects and network with like minded people.
我们已经确定Git是一个版本控制系统,与其他可用替代方案相似,但效果更好。 那么,是什么让GitHub如此特别呢? Git是一种命令行工具,但是涉及Git的所有事物都围绕着中心旋转-GitHub.com-开发人员在该中心与志同道合的人一起存储他们的项目和网络。
Let’s go over a few of the main reasons that geeks like to use GitHub, and learn some terminology along the way.
让我们讨论一些极客喜欢使用GitHub的主要原因,并在此过程中学习一些术语。
资料库 (Repository)
A repository (usually abbreviated to “repo”) is a location where all the files for a particular project are stored. Each project has its own repo, and you can access it with a unique URL.
储存库(通常缩写为“ repo”)是存储特定项目的所有文件的位置。 每个项目都有自己的存储库,您可以使用唯一的URL访问它。
![](https://i-blog.csdnimg.cn/blog_migrate/80b8bb77953b2d6522617e7b28d8a7ee.png)
分叉回购 (Forking a Repo)
“Forking” is when you create a new project based off of another project that already exists. This is an amazing feature that vastly encourages the further development of programs and other projects. If you find a project on GitHub that you’d like to contribute to, you can fork the repo, make the changes you’d like, and release the revised project as a new repo. If the original repository that you forked to create your new project gets updated, you can easily add those updates to your current fork.
“分叉”是指您基于已经存在的另一个项目创建新项目时。 这是一个了不起的功能,极大地鼓励了程序和其他项目的进一步开发。 如果您在GitHub上找到要贡献的项目,则可以派生该仓库,进行所需的更改,然后将修订后的项目作为新仓库发布。 如果您为创建新项目创建的原始存储库已更新,则可以轻松地将这些更新添加到当前的fork中。
拉取请求 (Pull Requests)
You’ve forked a repository, made a great revision to the project, and want it to be recognized by the original developers—maybe even included in the official project/repository. You can do so by creating a pull request. The authors of the original repository can see your work, and then choose whether or not to accept it into the official project. Whenever you issue a pull request, GitHub provides a perfect medium for you and the main project’s maintainer to communicate.
您已经分叉了一个存储库,对该项目进行了重大修订,并希望它被原始开发人员认可-甚至可能包含在正式的项目/存储库中。 您可以通过创建拉取请求来实现。 原始存储库的作者可以查看您的工作,然后选择是否将其接受到正式项目中。 每当您发出拉取请求时,GitHub都会为您和主要项目的维护者提供一种完美的交流平台。
社交网络 (Social networking)
The social networking aspect of GitHub is probably its most powerful feature, allowing projects to grow more than just about any of the other features offered. Each user on GitHub has their own profile that acts like a resume of sorts, showing your past work and contributions to other projects via pull requests.
GitHub的社交网络方面可能是其最强大的功能,它使项目的增长远超过提供的任何其他功能。 GitHub上的每个用户都有自己的个人资料,其行为类似于各种简历,显示您过去的工作以及通过拉取请求对其他项目的贡献。
Project revisions can be discussed publicly, so a mass of experts can contribute knowledge and collaborate to advance a project forward. Before the advent of GitHub, developers interested in contributing to a project would usually need to find some means of contacting the authors—probably by email—and then convince them that they can be trusted and their contribution is legit.
项目修订可以公开讨论,因此大量专家可以提供知识并进行协作以推动项目向前发展。 在GitHub出现之前,有兴趣为项目做贡献的开发人员通常需要找到一些与作者联系的方法(可能是通过电子邮件),然后说服他们相信他们是受信任的,而且他们的贡献是合法的。
变更日志 (Changelogs)
When multiple people collaborate on a project, it’s hard to keep track revisions—who changed what, when, and where those files are stored. GitHub takes care of this problem by keeping track of all the changes that have been pushed to the repository.
当多个人在一个项目上进行协作时,很难跟踪修订—谁更改了什么,何时何地存储这些文件。 GitHub通过跟踪已推送到存储库的所有更改来解决此问题。
GitHub不仅适合开发人员 (GitHub Isn’t Just for Developers)
All this talk about how GitHub is ideal for programmers may have you believing that they are the only ones who will find it useful. Although it’s a lot less common, you can actually use GitHub for any types of files. If you have a team that is constantly making changes to a word document, for example, you could use GitHub as your version control system. This practice isn’t common, since there are better alternatives in most cases, but it’s something to keep in mind.
所有关于GitHub如何适合程序员的讨论都可能会让您相信,只有GitHub对他们有用。 尽管它很少见,但实际上您可以将GitHub用于任何类型的文件。 例如,如果您的团队不断更改Word文档,则可以使用GitHub作为版本控制系统。 这种做法并不常见,因为在大多数情况下都有更好的选择,但是要记住这一点。
Now that you know what GitHub is all about, are you ready to get started? Head over to GitHub.com and be sure to check out their help pages after signing up.
既然您知道GitHub的全部含义,您准备好开始了吗? 登录GitHub.com,并确保在注册后查看其帮助页面 。
翻译自: https://www.howtogeek.com/180167/htg-explains-what-is-github-and-what-do-geeks-use-it-for/
github有什么作用