首页 > Web开发 > 详细

怎么在github上上传项目?

时间:2017-10-04 16:38:26      阅读:447      评论:0      收藏:0      [点我收藏+]

1.首先创建一个github账号

2.创建仓库,将仓库clone到本地

3.在本地添加项目,上传到github中

4.在github中设置访问权限

ed:1.如果是window版本通过https://git-scm.com/downloads下载,如果下载不下来通过F12查看下载地址,通过迅雷或者其他的软件进行下载。

  2.通过git clone 自己仓库的网站地址,不能在桌面直接创建,需要创建个文件夹,下载后进入github.io进行添加项目

  3.git add 文件名 或者 git add . 添加所有

  4.git commit -m "添加注释"

  5.git push -u origin master推到github中

  6.如果添加出现下面错误

* Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account‘s default identity. Omit --global to set the identity only in this repository. fatal: empty ident name (for (null)>) not allowed during executing git -c core.quotepath=false commit -m "Initial commit" --

  解决方式:在git bash终端中添加下面两行代码

  1. git config --global user.email "you@example.com"  
  2. git config --global user.name "Your Name"

  上面的方法配置的是全局的用户名和邮箱!就是说如果没有单独为项目配置,那提交的所有项目全部都是这个名字和邮箱!

  

  单独为项目配置的方法(全局和单独配置都存在的时候会默认使用项目单独配置的):

  1.打开项目所在目录,找到隐藏的.git文件夹。注意这个文件夹是隐藏的,显示隐藏出来就行。

  2.打开文件夹里的config文件,推荐用nodepad++打开。

  3.添加这三行到文件:

  [user]
      name = XXX(自己的名称)
      email = XXXX(邮箱)

  当然也可以通过命令行的方式,只需要在 .git 文件夹下。 例如执行如下命令:

  git  config  user.name  "xxxxx"

5.在setting中进行更改
技术分享
更改后,再次查看此处有网址打开是index.html可以更改后面的路径。

 

怎么在github上上传项目?

原文:http://www.cnblogs.com/chuanzhou/p/7625767.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!