Q1:基本流程
A:
- 进入目标目录(本地仓库地址)
cd d:/目标目录地址
- 初始化
git init hello.cpp
- 添加文件
git add hello.cpp
- 提交版本
git commit -m "test"
- 上传远程代码并合并
$ git push -u origin master -f
Q2:关联远程仓库的方式
A:
创建ssh key:原文链接#SSH# $ git remote add origin [email protected]/qq_52281545/221900230.git
$ ssh-keygen -t rsa -C "[email protected]"
登录:
$ ssh -T [email protected]
!!!:“上传远程代码并合并”的步骤中会出现一个弹窗。。。没找着怎么解决,就先pass了#Https# git remote add orgin https://gitcode.net/qq.52281545/221900230
Q3:fatal:‘origin‘ does not appear to be a git repository fatal:Could not read from remote repository
A: Q3解决方案链接
Q4:git push后报错:! [remote rejected] master -> master (pre-receive hook declined)