将项目上传到Github之使用git命令上传

1,先从GitHub网页上建立一个数据仓库

2,安装git 下载地址:https://www.git-scm.com/download/win

3,找到本地要上传的项目目录,右键点击Git Bash Here

4,在命令行中,输入“git init”,使文件加入git管理

5,输入:git add .(注意不要忘记 . ) 将文件夹全部内容添加到git

6,输入“git commit -m "first commit"”(“git commit -m "提交信息"”)

7,.输入:git remote add origin https://github.com/nlc1234/JavaWeb.git   (git remote add origin 你自己的https地址),连接你的guthub仓库

8,输入“git push -u origin master”,上传项目到Github。这里会要求输入Github的账号密码,按要求输入就可以

9,成功

猜你喜欢

转载自www.cnblogs.com/news1997/p/10919027.html