# 情况一:
https://blog.csdn.net/weixin_45030703/article/details/108735857
# 异机本地创建仓库,关联gitee同名仓库,并上传文件
# 1
gitee创建仓库名 vue-project-learnig
# 2
目的文件夹下
使用git bash
配置账户信息!
$ git config --global user.name "SAM9029"
$ git config --global user.email "18228673021@163.com"
1
2
3
4
2
3
4
# 3初始化仓库
$ git init
// 初始化,并创建仓库!!
$ git init kdir vue-project-learnig
//使用命令`git remote add`和码云的远程库关联:
// http的方式
git remote add origin http://xxxx
//or ssh的方式
git remote add origin git@gitee.com:yourName/repositoryname.git
//检查仓库情况变化
$ git status
!!!接下来三板斧
add .
commit -m 'msg'
push
$ git push -u origin master
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 异常情况处理:
1.
error: failed to push some refs to
解决方法:
$ git pull --rebase origin master
2.
LF will be replaced by CRLF
$ git config --global core.autocrlf false
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
git push 的 -u 参数具体适合含义? - 浪子的回答 - 知乎 https://www.zhihu.com/question/20019419/answer/138627544