美文网首页
本地代码上传github仓库

本地代码上传github仓库

作者: 程序员小布的养生之道 | 来源:发表于2017-12-04 16:28 被阅读0次

1、进入本地项目

2、git init 

3、如果有node-module类似的文件夹需要忽略,则在本地项目中创建个.gitignore文件,文件中国年配置node_modules/,然后git add *

4、git commit -m ‘提交内容’

5、git remote add origin https://github.com/pugbabu/nodeBlog.git (仓库地址填自己的具体地址)

6、git pull

7、git push --force origin master

8、成功

9、如果本地仓库添加了些不想上传到github上的文件,可以删除本地仓库find . -name ".git" | xargs rm -Rf

然后重新git init

相关文章

网友评论

      本文标题:本地代码上传github仓库

      本文链接:https://www.haomeiwen.com/subject/itpxixtx.html