美文网首页
本地项目上传GitHub

本地项目上传GitHub

作者: cw0925 | 来源:发表于2017-04-14 11:44 被阅读7次

cd进入本地项目

git init

git add .

git commit -m "initcommit"

git remote add origin https://github.com/yaoliangjun/Test.git(GitHub上的项目地址)

git push -u origin master

上一步可能报错:

error: failed to push some refs to 'https://github.com/yaoliangjun/Test.git'

输入:git push -f origin master 即可

移除git

打开终端

1、cd到项目目录

2、执行find ./ -name .git -exec rm -rf {} \;即可

相关文章

网友评论

      本文标题:本地项目上传GitHub

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