杂症1
- The current branch develop has no upstream branch </br> 造成上述场景,本地分支代码还未和远程仓库分支代码建立关联关系,当push的时候便会出现上述错误</br> 解决办法</br> git push --set-upstream origin develop</br>
杂症2
杂症3
- 使用git提交到远程仓库,每次都要输入用户名和密码的解决方法</br> 解决办法</br>
- 切换到C:\Users\jysemel.ssh目录下
- 执行 ssh-keygen -t rsa -C "jysemel@dd.com"
- cat id_rsa.pub 复制下面的公钥串信息
- 进入osc gitee 或者 github下面,本篇以github为例,进入https://github.com/settings/keys下面,</br> 添加新的ssh key,title名称随便
- 选择远程仓库的clone地址为ssh,不是https模式
- ssh -T git@github.com 出现下面信息,表示成功
The authenticity of host 'github.com (13.229.188.59)' can't be established.
RSA key fingerprint is SHA256:sssssxxxx.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,13.229.188.59' (RSA) to the list of known hosts.
Hi kcnf! You've successfully authenticated, but GitHub does not provide shell access.
- git remote add origin git@github.com:kcnf/stu_git.git 建立本地和远程仓库链接
杂症4
- 傻傻的分不清 git pull / git push / git rebase /git fetch区别</br> 解决办法</br>