简体   繁体   English

如何使用github - OS X获取源代码

[英]How to get a source code using github - OS X

I am trying to get a source code for an application from github. 我试图从github获取应用程序的源代码。

But i can not exactly figure out how to accomplish and set this up... 但我无法弄清楚如何完成并设置它......

Has anyone used github before. 有没有人之前使用过github。

i am using the latest version on OS X 我在OS X上使用最新版本

This does not seem to be android related; 这似乎与android没有关系; however, the simplest way to get source of a github project without knowing how to use git is to visit their page on github, and use the "downloads" button near the top right of the page. 但是,在不知道如何使用git的情况下获取github项目源的最简单方法是访问github上的页面,并使用页面右上角附近的“下载”按钮。

Example of a page: https://github.com/joyent/node - notice the downloads button on the right next to the description. 页面示例: https//github.com/joyent/node - 请注意说明旁边右侧的下载按钮。

If you have git installed you can clone the url provided on that page. 如果您安装了git,则可以克隆该页面上提供的URL。 Ex: git clone https://github.com/joyent/node.git 例如:git clone https://github.com/joyent/node.git

If you just want the latest version, click the “Downloads” link on the repository page to receive a zip file. 如果您只想要最新版本,请单击存储库页面上的“下载”链接以接收zip文件。 If you want to browse the history locally or make commits, install git and clone it: 如果要在本地浏览历史记录或进行提交,请安装git并克隆它:

  1. Read How to install git? 阅读如何安装git? The Mac link on Git's home page appears to link to an easy installer. Git主页上的Mac链接似乎链接到一个简单的安装程序。
  2. On the main page for a repository on github, there is a URL of the form https://github.com/username/repository.git . 在github上的存储库的主页上,有一个https://github.com/username/repository.git形式的URL。 In the terminal, use the command git clone https://github.com/… to clone it. 在终端中,使用命令git clone https://github.com/…来克隆它。

Not sure about Macs but on Linux its, git clone (git addy). 不确定Mac,但在Linux上,git clone(git addy)。 which will create a clone of the project. 这将创建项目的克隆。 If you're using eclipse, check out egit. 如果你正在使用eclipse,请查看egit。 Also read the docs on github to understand what git is and how to use it. 另请阅读github上的文档,了解git是什么以及如何使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM