首页 > > > 常见的一些git操作场景
git config --global user.name "Administrator"
git config --global user.email "2312119590@qq.com"
git clone http://192.168.1.103:8001/qf/secondproject.git
cd secondproject
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
cd existing_folder
git init
git remote add origin http://192.168.1.103:8001/qf/secondproject.git
git add .
git commit -m "Initial commit"
git push -u origin master
cd existing_repo
git remote rename origin old-origin
git remote add origin http://192.168.1.103:8001/qf/secondproject.git
git push -u origin --all
git push -u origin --tags
git添加远程库的时候有可能出现如下的错误:
fatal:remote origin already exists怎么解决?
只要两步:
1.先删除:
$ git remote rm origin
2.再次执行添加就可以了.
6.git push origin master上传本地项目到远程仓库时,报错“fatal: 'origin' does not appear to be a git repository”的解决办法.
原因: 没有关注远程仓库为origin
解决: git remote add origin “远程仓库地址”
原文作者:;如有侵权,请联系管理员删除。