GitHub是一个面向开源及私有软件项目的托管平台,有绝大一部分开发者喜欢把项目的代码托管到GitHub上,下面,就来讲讲怎么用GitHub客户端来上传代码。
1.要上传到github上首先要有一个github账号。(没有账号的童鞋可以去官网注册一个,网址:https://github.com/github )

2.有了账号之后就需要有GitHub客户端,下载网址:https://desktop.github.com

3.下载安装成功后会在应用列表中会出现下方图标

4.进入github官网并登陆,登录后,可以看到右上角的头像。点击头像左侧的加号按钮,选择new repository,创建仓库。

5.填写项目工程的基本信息
(1)、填写你需要上传工程的名称
(2)、勾选上“Initialize this repository with a README”选项。
(3)、点击“create repository”

看到这种页面就说明已经创建成功了

6.打开GitHub客户端并登录账号
点击左上角的“+”号,选择Clone,选中刚刚在网页端创建的工程名选项,点击Clone GithubDemo按钮

7.选择保存名称和保存位置

8.右键点击左边栏Clone下来的工程名,选择Open In Finder,打开工程所在目录。

9.把需要上传的代码文件拖入改目录中,然后重新打开客户端会看到代码文件

10.点击下方Commit to master,完成后,点击右上角的Sync同步上传,上传完成后,即可在GitHub上看到项目文件


网友评论