1.修改仓库
(1)git remote -v
查看远程仓库
(2)git remote set-url origin https://gitee.com/yigeyellow/xv6-labs-2020-final.git
https://gitee.com/yigeyellow/xv6-labs-2020-final.git改成自己的仓库
2.commit
(1)git add --all
或 git add
你要保存更改的文件们
(2)git commit -m "本次Commit你做了什么"
“”里的内容可修改
3.分支
(1)git fetch --all
将上游仓库同步到本地
(2)git branch ext2
建立ext2分支
(3)git checkout ext2
进入ext2分支
(4)git push
上传
(5)git push --set-upstream origin ext2
如果没有upstream则需要用这个上传,不过用错了也会提示用这个,无伤大雅
2022.5.12
一、后来用ssh上传,参考:
【6分钟学会gitee(码云)的注册和代码提交-哔哩哔哩】 https://b23.tv/xdyaSRt
获取ssh key:
上传文件操作:
git clone git@gitee.com:yigeyellow/xxxx.git
cd xxxx
加入文件
git add .
git commit -m “my commit”
git push
中途遇到的错误解决参考:
https://blog.csdn.net/qq_33442844/article/details/78491777
问题是出现:Enter file in which to save the key (/Users/username/.ssh/id_rsa):
二、用http,参考:
【git 如何用git上传完整项目到gitee-哔哩哔哩】 https://b23.tv/2IZgIx8