记录如何将从gitee上克隆的项目,上传到自己的私有库中
- 在gitee官网上新建一个仓库
- 鼠标右键打开git bash here
-
初始化仓库信息命令
git init
-
将文件进行缓存命令
git add .
- 添加一个备注,方便查看何时修改什么
git commit -m "测试"
- 将刚刚创建的gitee仓库进行关联操作
git remote add origin 地址
- 提交代码到远程仓库
git push --set-upstream origin master
遇到报错
-
! [rejected] master -> master (fetch first) error: failed to push some refs to 'https://gitee.com/xiongdaandxionger/robot.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
解决办法:
转自! [rejected] master -> master (fetch first) error: failed to push some refs to ‘https://gitee_! [rejected] master -> master (fetch first) error:-CSDN博客
-
remote: [session-3d448e89] 2294201664@qq.com: Incorrect username or password (access token)
解决办法:
转自:Git-remote Incorrect username or password ( access token )_git remote username passpord-CSDN博客