如何使用github_GIT:使用Github

如何使用github

There a lot of options available that allow you to host your repositories. If you are well versed with system administration, you can host them yourselves. If not, there are a lot of services available that take care of hosting for free, if you are okay with your repositories being public, for example, Bitbucket, CloudForge, Assembla etc. The most popular of these services is GitHub.

有很多选项可用来托管您的存储库。 如果您精通系统管理,则可以自己托管。 如果没有,有很多服务可免费托管,如果您可以将存储库设为公开,则可以免费托管,例如Bitbucket,CloudForge,Assembla等。其中最受欢迎的服务是GitHub

GitHub has a user base of millions of developers and provides excellent tools to manage your projects. Go to GitHub and set up your account. Once you sign up, GitHub provides you with a tour of all the features they have to offer

GitHub拥有数百万开发人员的用户群,并提供了出色的工具来管理您的项目。 转到GitHub并设置您的帐户。 注册后,GitHub会为您提供他们必须提供的所有功能的导览

GITHUB

We recommend you go through the tour to understand GitHub better. You can search for repositories, for example go on and type "Linux" in the search bar. The first result is the Linux kernel source tree. The little graph behind it indicates how often people have been committing to the repository over time. Let's go take a look at this page.

我们建议您浏览以更好地了解GitHub。 您可以搜索存储库,例如继续并在搜索栏中键入“ Linux”。 第一个结果是Linux内核源代码树。 后面的小图表明了人们随着时间而不断提交到存储库的频率。 让我们来看看这个页面。

GITHUB

We see a brief description of the project as well as some statistics about the repository. The Linux repository has seen over half a million commits and 452 releases over time. That is massive!

我们将看到该项目的简短描述以及有关存储库的一些统计信息。 随着时间的推移,Linux系统信息库已经提交了超过一百万次提交和452个版本。 那是巨大的!

GITHUB

If GitHub didn't make this information available easily, we'd have had to clone a copy of the repository down to our computer in order to be able to find out how active of a project GitHub is, what kind of project it is to begin with, what the code currently looks like, or any number of other questions we might have.Since they're hosting in on GitHub though, we can find all of that information from our web browser.

如果GitHub无法轻松地提供此信息,则我们必须将存储库的副本克隆到我们的计算机中,以便能够找到GitHub项目的活跃程度,它对哪种项目的兴趣。首先,代码的外观,或者我们可能遇到的其他问题。由于它们托管在GitHub上,因此我们可以从网络浏览器中找到所有这些信息。

There are some other nice features that GitHub provides as well. Some projects get their own issue tracker. If we click on the issues tab of the page, we can see where people have been filing bugs and asking questions about the said project. If you're not familiar with an issue tracker, it provides people with a great place to raise and discuss issues about the project in question and usually provides tools to help the project maintainers work through those problems efficiently.

GitHub还提供了其他一些不错的功能。 一些项目有自己的问题跟踪器。 如果单击页面的问题选项卡,我们可以看到人们在哪里提交了bug并询问有关该项目的问题。 如果您不熟悉问题跟踪器,它为人们提供了一个提出和讨论有关项目问题的好地方,并且通常提供工具来帮助项目维护者有效解决这些问题。

Pull requests are an interesting concept that originated at GitHub. Remember that in GitHub, pulling code means that we merge changes in from a remote repository. Following this logic, a pull request is what you use when you have code that you want someone to pull into their project. This is a really useful tool for collaboration.

拉取请求是一个有趣的概念,起源于GitHub。 请记住,在GitHub中,提取代码意味着我们从远程存储库中合并更改。 按照此逻辑,当您具有希望某人将代码拖入其项目的代码时,将使用拉取请求。 这是一个非常有用的协作工具。

Let's stop and think about our awesome_project. It's not nearly as active as Linux, but we would still like to publish it on GitHub. Up in the top corner we can see a create new repo button. For the name, we'll just use awesome project for now. Provide a description if you want. This repository will be public since we are on a free account.

让我们停下来思考一下我们的awesome_project 。 它不像Linux那样活跃,但是我们仍然希望将其发布在GitHub上。 在右上角,我们可以看到一个创建新的仓库按钮。 对于名称,我们现在仅使用很棒的项目。 如果需要,请提供描述。 由于我们拥有免费帐户,因此该存储库将是公开的。

That's okay, we want to share our repository with you guys anyway! GitHub provides some help in creating a brand new repository. But since we have our own repository we need to do only the last two steps. We need to add GitHub as a remote, and we need to push our changes up.

没关系,我们还是想与大家共享我们的存储库! GitHub为创建全新的存储库提供了一些帮助。 但是,由于我们拥有自己的存储库,因此只需要执行最后两个步骤。 我们需要将GitHub添加为远程站点,并且需要推动更改。

Let's go ahead and do that:

让我们继续这样做:

$ git remote add origin https://github.com/joshvarun/awesome_project.git
$ git push -u origin master

GITHUB

We'll run the lines that they say to run in the project. We'll need to provide our username and password. The push seems to have worked. We'll switch back over to GitHub, refresh the page, and we have our project history. You can see that over the course of the project we made 11 commits.

我们将运行他们说要在项目中运行的行。 我们需要提供用户名和密码。 推动似乎奏效了。 我们将切换回GitHub,刷新页面,并获得我们的项目历史记录。 您可以看到,在项目过程中,我们进行了11次提交。

GITHUB

Many hosting services like GitHub provide a well-featured interface to help you manage and explore your project history. Several teams have come to rely on these services to help them work more effectively and efficiently together.

GitHub之类的许多托管服务都提供了功能完善的界面,可帮助您管理和探索项目历史。 有几个团队开始依靠这些服务来帮助他们更加有效地开展工作。

翻译自: https://www.studytonight.com/github/github

如何使用github

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值