Skip to content
页面导航

Github 相关问题 ​

Github 上传 ​

初始化 ​

bash
git init

重命名 git bash 分支 ​

bash
git branch -m master main

添加远程连接 ​

bash
git remote add brandonvitepress git@github.com:DjyBrandon/brandonlibrary

git remote -v

将文件添加到本地缓存区 ​

bash
git add -A

添加文件描述信息 ​

bash
git commit -m "first commit"

把本地仓库的变化连接到远程仓库main ​

bash
git pull brandonvitepress main

如果报错忽略两个分支不同提交历史 ​

bash
git pull brandonvitepress main --allow-unrelated-histories

把本地仓库的文件推送到远程仓库main ​

bash
git push -u brandonvitepress main

git push brandonvitepress main

Git Bash 推送大文件失败 ​

参考链接:git push时候出现client_loop: send disconnect: Connection reset by peer

问题:

client_loop: send disconnect: Connection reset by peer

原因:http.postBuffer 默认上限为1M,所以将上限改大就行

解决方案:

bash
git config --global http.postBuffer 524288000
// 这里改成500M,之后就能顺利上传了

Released under the MIT License.