目录
报错error: 'app/' does not have a commit checked outfatal: adding files failed
报错:error: remote origin already exists.
3、已解决,可进行 git push -u origin "master"
1、码云gitee生成SSH公钥步骤
![](https://img-blog.csdnimg.cn/7b759a92d29543b78fd8898fd374bce6.png)
添加公钥后进行测试
将代码托管至码云
新建仓库
无仓库命令
有仓库命令![](https://img-blog.csdnimg.cn/1e2f193957e14e1381a96ac1015bde06.png)
如图 上传成功![](https://img-blog.csdnimg.cn/3c7c11747fe648f0b4dcd2d1667878a3.png)
1、创建好仓库,根据仓库教程进行操作
查看用户名和邮箱
2、文件夹根目录右键->Git Bash Here
如果第一次利用git提交,请配置好全局选项
git config --global user.name "用户名"
git config --global user.email "你的邮箱地址"
3、初始化仓库
git init
4、把本地文件放到暂存区
git add .
5、把本地文件放到本地仓库里面
git commit -m '提交Html5Css3代码'
6、链接远程仓库
git remote add origin 你新建的仓库地址
7、把本地仓库的文件推送到远程仓库 push
8、上传成功
已有仓库的步骤(已输入过git commit命令)
报错error: 'app/' does not have a commit checked out
fatal: adding files failed
提交项目子目录中有.git文件(可能是隐藏状态),显示隐藏文件即可
解决: 将子目录下的 .git 文件 删除
原因:子目录下有.git 与本目录上传的git冲突了
提示On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
原因:已有缓存,已进行过git commit命令
报错:error: remote origin already exists.
解决步骤
1、先删除远程 Git 仓库
$ git remote rm origin
2、重新关联到自己的仓库
$ git remote add origin 项目仓库地址(https://gitee.com/xxxxxx.git)
3、已解决,可进行 git push -u origin "master"
git push -u origin "master"
添加Gitee开源许可证