从github上克隆一个大项目的时候,如果不适用代理,可能只有几十K的速度,非常绝望,可以在git clone时直接使用代理: git clone -c https.proxy=”127.0.0.1:10809″ https://github.com/test/Fast.git 加速后效果: 其中 10809 是你本地代理的端口号。
git错误Your configuration specifies to merge with the ref xxxx
在分支master执行git pull的时候,提示错误: Your configuration specifies to merge with the ref ‘refs/heads/release/v20230413.1’ from the remote, but no such ref was fetched. 这个是由于远端的分支已经不存在了,而本地这个分支还保持着跟踪。删除分支跟踪然后删除 […]
github提示:Host key verification failed. fatal: Could not read from remote repository
在使用github仓库拉取代码时,有时候会出现RSA密钥的指纹对不上的情况,执行git pull等操作时出现类似以下提示: [root@test1]# git pull @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@ […]
git 恢复本地修改过的文件
修改了很多文件,还没有push到远程仓库,这时候想恢复几个文件或目录的修改。 只是修改了文件 还没有git add git checkout — file.txt # file.txt为文件名,也可以是目录 修改了文件,并提交到暂存区 编辑之后,已经运行了git add 但还没有运行 git commit -m …的情况 git reset HEAD # 回退到当前版本 git checkout […]
github报错”You’re using an RSA key with SHA-1, which is no longer allowed…“
今天从github拉取私有项目时,出现报错,内容如下: ERROR: You’re using an RSA key with SHA-1, which is no longer allowed. Please use a newer client or a different key type. Please see https://github.blog/2021-09-01-improvin […]
发布composer包到packagist及其auto-update和版本管理
PHP使用composer来管理工具包,比如我最近需要一个alipay的支付宝,官方只是提供了一个写得有些乱的sdk供参考。只能自己动手了,刚好记录一下发布一个自己的composer包的一般步骤。 标准的composer.json 在自己的包根目录新建一个composer.json,信息大概是这样的: { “name”: “ducksoft/alipay-php-sdk”, “descriptio […]