GitHub 是一个面向开源及私有软件项目的托管平台,因为只支持 Git 作为唯一的版本库格式进行托管,故名 GitHub。
GitHub 于 2008 年 4 月 10 日正式上线,除了 Git 代码仓库托管及基本的 Web 管理界面以外,还提供了订阅、讨论组、文本渲染、在线文件编辑器、协作图谱(报表)、代码片段分享(Gist)等功能。目前,其注册用户已经超过350万,托管版本数量也是非常之多,其中不乏知名开源项目 Ruby on Rails、jQuery、python 等。
sourceTree是一个工具;接下来我就教大家怎么把自己的代码传到github上面去;
1.首先你注册一个sourceTree的账号和github的账号,我这边就不写怎么去注册了
2.注册好账号后,在github上点击如图;

3.点击后,会弹出如下页面;

输入项目名称后,点击绿色按钮,即可;
3.打开新建的项目,点击绿色按钮,将地址复制下来

4.在本地新建一个文件夹,作为本地的仓库,
5.接下来,打开sourceTree客户端,单击新建/克隆如图;

源路径填写刚才复制的地址,目标路径就会刚才新建的文件夹的路径;填好后,点击确定即可,这样你的仓库就克隆到本地了;
6.克隆到本地的仓库有个.git文件千万不要删掉;然后自己的代码复制到本地的仓库中去,
7.然后点击Stage All后单击提交

8.接下来点击‘推送’


网友评论