From 62431ab1b43686e673ef0820f29abe828d99ed2f Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Fri, 27 Mar 2015 17:56:42 +0800 Subject: [PATCH 1/6] Translating by ZTinoZ --- ...t Open Source Code Repository in github.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/sources/tech/20150324 How to Host Open Source Code Repository in github.md b/sources/tech/20150324 How to Host Open Source Code Repository in github.md index 267486f211..eebbfac7ee 100644 --- a/sources/tech/20150324 How to Host Open Source Code Repository in github.md +++ b/sources/tech/20150324 How to Host Open Source Code Repository in github.md @@ -1,13 +1,12 @@ -Translating by ZTinoZ -How to Host Open Source Code Repository in github +怎样在Github上做开源代码库的主人 ================================================================================ -Hi all, today we will be learning how to host Source Code of Open Source Software in the repository hosted by github.com . GitHub is a web-based Git repository hosting service, which offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding its own features. It provides a workplace to host powerful collaboration, code review, and code management for open source and private projects. Unlike Git, which is strictly a command-line tool, GitHub provides a web-based graphical interface and desktop as well as mobile integration. GitHub offers both paid plans for private repositories and free accounts, which are usually used to host open-source software projects. +大家好,今天我们要学习一下怎样在github.com上的开源软件库中源代码的主人。GitHub is a web-based Git repository hosting service, which offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding its own features. It provides a workplace to host powerful collaboration, code review, and code management for open source and private projects. Unlike Git, which is strictly a command-line tool, GitHub provides a web-based graphical interface and desktop as well as mobile integration. GitHub offers both paid plans for private repositories and free accounts, which are usually used to host open-source software projects. ![github universe logo](http://blog.linoxide.com/wp-content/uploads/2015/03/github-universe.jpg) It is fast and more flexible web based hosting service which is easy to use and to manage distributed revision control. Anyone can host their software's source code in github's repository for the use, contribution, sharing, issue tracking and many more by millions of people across the globe. Here are some easy and quick steps to easily host software's source code. -### 1. Creating a new Github Account ### +### 1. 创建一个新的Github账号 ### First of all, open your favorite browser and go to Github's homepage url ie [github][1]. Then, the homepage will be opened as shown below. @@ -19,7 +18,7 @@ After the you entered the valid information required for sign up, you'll be redi ![choosing plan](http://blog.linoxide.com/wp-content/uploads/2015/03/choosing-plan.png) -### 2. Creating a New Repository ### +### 2. 创建一个新的库 ### After we have successfully signed up a new account or logged in to Github, we'll now need to create a new Repository to get started. @@ -37,7 +36,7 @@ After it is done, we'll get to see something similar like this image. ![repository github](http://blog.linoxide.com/wp-content/uploads/2015/03/repository-github.png) -### 3. Uploading an existing Project ### +### 3. 上传一个已有项目 ### If we want to share our existing project on Github, we'll surely need to push the codes to the repository we created. To do so, we'll first need to install git in our Linux machine. As I am running Ubuntu 14.04 LTS in my machine, I'll need to run **apt** manger to install it. @@ -78,7 +77,7 @@ Now, to push the changes in our local repository to GitHub's repo we'll need to ![pushing repo](http://blog.linoxide.com/wp-content/uploads/2015/03/pushing-repo.png) -### Cloning a Repo ### +### 克隆一个库 ### If we want to download a code repository from github straight to our local drives with a single command then, we can simply use git clone command which will clone the current directory to the remote repository. @@ -88,7 +87,7 @@ If we want to download a code repository from github straight to our local drive Please change the above url to the repository you want to clone from. -### Updating a Change ### +### 更新改动 ### If we made changes to our code and want to push them to our remote repository then after changing the changes, we should run the following commands inside that directory. @@ -96,7 +95,7 @@ If we made changes to our code and want to push them to our remote repository th $ git commit -m "Updating" $ git push -### Conclusion ### +### 结论 ### Hurray! We have successfully hosted our Project Source Code in Github repository. Github is fast and more flexible web based hosting service which is easy to use and to manage distributed revision control. Millions of awesome Open Source projects are hosted in github. So, if you have any questions, suggestions, feedback please write them in the comment box below. Thank you ! Enjoy Github :-) @@ -105,7 +104,7 @@ Hurray! We have successfully hosted our Project Source Code in Github repository via: http://linoxide.com/usr-mgmt/host-open-source-code-repository-github/ 作者:[Arun Pyasi][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ZTinoZ](https://github.com/ZTinoZ) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 From fb9950cdb94922f04ed20571bc5510970ba20787 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Mon, 30 Mar 2015 12:22:55 +0800 Subject: [PATCH 2/6] Translating by ZTinoZ --- ...324 How to Host Open Source Code Repository in github.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/tech/20150324 How to Host Open Source Code Repository in github.md b/sources/tech/20150324 How to Host Open Source Code Repository in github.md index eebbfac7ee..40bc045b47 100644 --- a/sources/tech/20150324 How to Host Open Source Code Repository in github.md +++ b/sources/tech/20150324 How to Host Open Source Code Repository in github.md @@ -1,14 +1,14 @@ 怎样在Github上做开源代码库的主人 ================================================================================ -大家好,今天我们要学习一下怎样在github.com上的开源软件库中源代码的主人。GitHub is a web-based Git repository hosting service, which offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding its own features. It provides a workplace to host powerful collaboration, code review, and code management for open source and private projects. Unlike Git, which is strictly a command-line tool, GitHub provides a web-based graphical interface and desktop as well as mobile integration. GitHub offers both paid plans for private repositories and free accounts, which are usually used to host open-source software projects. +大家好,今天我们要学习一下怎样管理github.com库中的开源软件源代码。GitHub是一个基于web的Git库托管服务,提供分布式修改控制和Git的源代码管理(SCM)功能并加入了自身的特点。它给开源和私有项目提供了一个互相协作的工作区、代码预览和代码管理功能。不像Git,一个完完全全的命令行工具,GitHub提供了一个基于web的图形化界面和桌面,也整合了手机。GitHub同时提供了私有库付费计划和免费账号,都是用来管理开源软件项目的。 ![github universe logo](http://blog.linoxide.com/wp-content/uploads/2015/03/github-universe.jpg) -It is fast and more flexible web based hosting service which is easy to use and to manage distributed revision control. Anyone can host their software's source code in github's repository for the use, contribution, sharing, issue tracking and many more by millions of people across the globe. Here are some easy and quick steps to easily host software's source code. +这是一种快速灵活,基于web的托管服务,它使用方便,管理分布式修改控制系统也是相当容易,任何人都能为了将它们使用、贡献、共享、问题跟踪和更多的全球各地数以百万计的人在github的库里管理他们的软件源代码。这里有一些简单快速地管理软件源代码的方法。 ### 1. 创建一个新的Github账号 ### -First of all, open your favorite browser and go to Github's homepage url ie [github][1]. Then, the homepage will be opened as shown below. +首先First of all, open your favorite browser and go to Github's homepage url ie [github][1]. Then, the homepage will be opened as shown below. ![Github Homepage](http://blog.linoxide.com/wp-content/uploads/2015/03/github-homepage.png) From f345442fed75078ca6189605a9499d987318b544 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 31 Mar 2015 18:32:51 +0800 Subject: [PATCH 3/6] Translating by ZTinoZ --- ...324 How to Host Open Source Code Repository in github.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/tech/20150324 How to Host Open Source Code Repository in github.md b/sources/tech/20150324 How to Host Open Source Code Repository in github.md index 40bc045b47..00c7cb57e6 100644 --- a/sources/tech/20150324 How to Host Open Source Code Repository in github.md +++ b/sources/tech/20150324 How to Host Open Source Code Repository in github.md @@ -8,13 +8,13 @@ ### 1. 创建一个新的Github账号 ### -首先First of all, open your favorite browser and go to Github's homepage url ie [github][1]. Then, the homepage will be opened as shown below. +首先,打开你最喜欢的浏览器并访问[github][1],首页页面如下所示。 ![Github Homepage](http://blog.linoxide.com/wp-content/uploads/2015/03/github-homepage.png) -Now, after the homepage has been opened, please fill form shown to sign up for a new github account. +现在,首页打开之后,请填写一个新的github账号用于注册。 -After the you entered the valid information required for sign up, you'll be redirected to the plan choosing step. We have 5 plans listed in this page. One can choose the plan according to their requirement. Here, we'll go for a free plan. So, click on Choose to the Free plan and click on Finish Sign up. If we are planning to create an organization then, we need to tick on Help me setup an organization next. +输入注册所需的有效信息之后,你会被转到计划选择的步骤。在这个页面上有5种计划,我们可以根据需要来选择,这里我们要选择免费计划。所以,我们点击选择Free计划并完成注册。如果我们接下去还打算创建一个组织,那我们需要勾选“Help me setup an organization next”。 ![choosing plan](http://blog.linoxide.com/wp-content/uploads/2015/03/choosing-plan.png) From 822027ee379b102fad77ee52f796de16155a7f14 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Wed, 1 Apr 2015 18:13:30 +0800 Subject: [PATCH 4/6] Translating by ZTinoZ --- ...ow to Host Open Source Code Repository in github.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sources/tech/20150324 How to Host Open Source Code Repository in github.md b/sources/tech/20150324 How to Host Open Source Code Repository in github.md index 00c7cb57e6..20253f476c 100644 --- a/sources/tech/20150324 How to Host Open Source Code Repository in github.md +++ b/sources/tech/20150324 How to Host Open Source Code Repository in github.md @@ -20,19 +20,19 @@ ### 2. 创建一个新的库 ### -After we have successfully signed up a new account or logged in to Github, we'll now need to create a new Repository to get started. +成功注册新账号或登录上Github之后,我们需要创建一个新的库来开始我们的正题。 -Click on **(+)** button which is located at the top right near the account id. Then Click on New Repository . +点击位于顶部靠右账号id旁边的**(+)**按钮,然后点击“New Repository”。 ![Add new repository](http://blog.linoxide.com/wp-content/uploads/2015/03/create-new-repository.png) -Now, after clicking on add a new repository, we'll now be directed to the page where we'll need to enter the required information. +点击创建一个新的库之后,我们进入了填写所需信息的页面。 ![adding repository information](http://blog.linoxide.com/wp-content/uploads/2015/03/adding-information-repository.png) -Now, after entering the required information about the new repository, we'll need to click on green Create repository button. +填写好信息之后,我们点击绿色的“Create repository”按钮。 -After it is done, we'll get to see something similar like this image. +这些步骤都做完之后,我们将看到类似于下面这张图的页面。 ![repository github](http://blog.linoxide.com/wp-content/uploads/2015/03/repository-github.png) From ea988e9a0cb20eff4a93611d0a76a67760a62155 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Thu, 2 Apr 2015 18:01:02 +0800 Subject: [PATCH 5/6] Translating by ZTinoZ --- ...0150324 How to Host Open Source Code Repository in github.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20150324 How to Host Open Source Code Repository in github.md b/sources/tech/20150324 How to Host Open Source Code Repository in github.md index 20253f476c..e9ff764434 100644 --- a/sources/tech/20150324 How to Host Open Source Code Repository in github.md +++ b/sources/tech/20150324 How to Host Open Source Code Repository in github.md @@ -38,7 +38,7 @@ ### 3. 上传一个已有项目 ### -If we want to share our existing project on Github, we'll surely need to push the codes to the repository we created. To do so, we'll first need to install git in our Linux machine. As I am running Ubuntu 14.04 LTS in my machine, I'll need to run **apt** manger to install it. +如果我们想在Github上分享我们的项目,我们自然要把代码推上我们创建的库中。想要这样的话,我们首先要在我们的Linux机器上安装git。如果As I am running Ubuntu 14.04 LTS in my machine, I'll need to run **apt** manger to install it. $ sudo apt-get install git From 2f6a8c3fd82fb3d460b25205acad290dbb0a57b8 Mon Sep 17 00:00:00 2001 From: ZTinoZ Date: Tue, 7 Apr 2015 16:59:02 +0800 Subject: [PATCH 6/6] Finish the translation by ZTinoZ --- ...t Open Source Code Repository in github.md | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) rename {sources => translated}/tech/20150324 How to Host Open Source Code Repository in github.md (69%) diff --git a/sources/tech/20150324 How to Host Open Source Code Repository in github.md b/translated/tech/20150324 How to Host Open Source Code Repository in github.md similarity index 69% rename from sources/tech/20150324 How to Host Open Source Code Repository in github.md rename to translated/tech/20150324 How to Host Open Source Code Repository in github.md index e9ff764434..d382f9cd64 100644 --- a/sources/tech/20150324 How to Host Open Source Code Repository in github.md +++ b/translated/tech/20150324 How to Host Open Source Code Repository in github.md @@ -38,40 +38,40 @@ ### 3. 上传一个已有项目 ### -如果我们想在Github上分享我们的项目,我们自然要把代码推上我们创建的库中。想要这样的话,我们首先要在我们的Linux机器上安装git。如果As I am running Ubuntu 14.04 LTS in my machine, I'll need to run **apt** manger to install it. +如果我们想在Github上分享我们的项目,我们自然要把代码推上我们创建的库中。想要这样的话,我们首先要在我们的Linux机器上安装git。如果我在机器上运行的是Ubuntu 14.04 LTS,我需要运行**apt**工具来安装它。 $ sudo apt-get install git ![installing git](http://blog.linoxide.com/wp-content/uploads/2015/03/install-git.png) -Now, as git is ready, we are now ready to upload the codes. +现在git已经准备就绪,我们要上传代码了。 -**Note**: To avoid errors, do not initialize the new repository with **README**, license, or gitignore files. You can add these files after your project has been pushed to GitHub. +**注意**:为了避免错误,不要用**README**文件、许可证或gitignore文件来初始化新库,你可以在项目推送到Github上之后再添加它们。 -In Terminal, we'll need to change the current working directory to your local project then initialize the local directory as a Git repository/ +在终端上,我们需要把当前工作目录更改为你的本地项目,然后将本地目录初始化为Git库。 $ git init -We'll then add the files in our new local repository. This stages them for the first commit. +接着我们在我们的新的本地库里添加的文件来作为我们的首次提交内容。 $ git add . -Now, we'll need to commit the files that we've staged in our local repository. +现在我们就提交我们在本地库所添加的文件。 $ git commit -m 'First commit' ![git commit](http://blog.linoxide.com/wp-content/uploads/2015/03/git-commit.png) -In Terminal, we'll add the URL for the remote repository where our local repostory will be pushed. +在终端上,我们要给远程库添加URL地址,用于以后我们能提交我们本地的库。 $ git remote add origin remote Repository url $ git remote -v ![adding remote url](http://blog.linoxide.com/wp-content/uploads/2015/03/adding-remote-url.png) -Note: Please do replace remote Repository url to the url of the remote repo. +注意:请确保将远程库的URL替换成了自己的远程库的URL。 -Now, to push the changes in our local repository to GitHub's repo we'll need to run as below and enter the required credential for the repository. +现在,要将我们的本地库提交至GitHub版本库中,我们需要运行一下命令并且输入所需的用户名和密码。 $ git push origin master @@ -79,17 +79,17 @@ Now, to push the changes in our local repository to GitHub's repo we'll need to ### 克隆一个库 ### -If we want to download a code repository from github straight to our local drives with a single command then, we can simply use git clone command which will clone the current directory to the remote repository. +如果我们想用一条简单地命令从github上下载代码库至本机上,我们可以用git clone命令,该命令将会从远程库中克隆最新的目录。 $ git clone https://github.com/aruntechgeek/linspeed.git ![cloning repo](http://blog.linoxide.com/wp-content/uploads/2015/03/cloning-repo.png) -Please change the above url to the repository you want to clone from. +请把以上这条URL地址更改成你想要克隆的地址。 ### 更新改动 ### -If we made changes to our code and want to push them to our remote repository then after changing the changes, we should run the following commands inside that directory. +如果我们对我们的代码做了更改并想把它们提交至我们的远程库中,我们应该在该目录下运行以下命令。 $ git add . $ git commit -m "Updating" @@ -97,7 +97,7 @@ If we made changes to our code and want to push them to our remote repository th ### 结论 ### -Hurray! We have successfully hosted our Project Source Code in Github repository. Github is fast and more flexible web based hosting service which is easy to use and to manage distributed revision control. Millions of awesome Open Source projects are hosted in github. So, if you have any questions, suggestions, feedback please write them in the comment box below. Thank you ! Enjoy Github :-) +啊哈!我们已经成功地管理我们在Github库中的项目源代码了。快速灵活的Github基于web的托管服务,分布式修改控制系统使用起来方便容易。数百万个非常棒的开源项目驻扎在github上。所以,如果你有任何问题、建议或反馈,请在评论中告诉我们。谢谢大家!好好享受吧 :-) --------------------------------------------------------------------------------