简记:日常使用的Git工作流
- fork中央仓库到自己的账号
- clone fork的个人仓库到本地
git remote add upstream https://github.com/maintainer/repo添加远程,通常我们命名为upstreamgit checkout -b bugfix创建分支- do something
git fetch upstream更新远程仓库git rebase upstream/master如果有 unstaged changes 需要先git stashgit diff检查修改内容准备提交git add .git commit -m "bugfix: do something"git push origin bugfix -u推送分支- 发起 origin/bugfix -> upstream/master 的pr