生成 ssh 密钥
ssh-keygen -t rsa -C "你的邮箱地址"
验证是否可正常访问
ssh -T git@github.com
C:\Windows\System32\drivers\etc\hosts
中添加单条记录140.82.114.3 github.com
ipconfig /flushdns
由于存在安全问题,git 协议 on 9418 端口不再提供支持,目前官网只提供 https 方式或者 ssh 方式。
方法一:手动去该项目地址的 github 网址,改成 https 方式或者 ssh 方式其中一种。 方法二:全局替换
git config --global url."https://github.com/".insteadOf git://github.com/
fork 的两种主要工作流程:
Joe 和其余贡献者已经对这个项目做了一些修改,而你将在他们的修改的基础上,还要再做一些修改。在你开始之前,你最好”同步你的 fork”,以确保在最新的复制版本里工作。下面是你要做的:
当你最初 fork 一个仓库的时候,信息的流向是从 Joe 的仓库到你的仓库,然后再到你本地计算机。但是最初的过程之后,信息的流向是从 Joe 的仓库到你的本地计算机,之后再到你的仓库。
为保证 master 分支纯净,自己只在特性分支进行二次开发
git remote add upstream <原仓库git地址>
git remote -v
git fetch upstream
git merge upstream/master
git push origin master
git clone -o gitee https://gitee.com/mirrors/ThingsBoard.git
git remote add origin <原仓库git地址>
浅谈 GIT 中的 Fork_撕裂石头的博客-CSDN 博客_git中的 fork https://blog.csdn.net/qq_29947967/article/details/80519113