git clone 别人的项目,把它变成自己的上传到GitHub

从别人哪里Clone来的项目

git clone https://github.com/XXX/SimpleUI

进入该文件内

cd SimpleUI

删除原有的.git信息,建议sudo

sudo rm -r .git

初始化.git

git init

将本地代码添加到仓库

git add ./////注意有空格

git commit -m "上传仓库时的说明"

登陆Github,然后在Github上新建一个Repositories 名字为SimpleUI

关联上远程仓库

git remote add origin https://github.com/YYY/SimpleUI

将你的代码上传到Github

git push --set-upstream origin master

输入你的Github的账户名

输入你的GitHub的密码,此处密码可能不显示

原文地址:https://www.cnblogs.com/stacso/p/12795656.html