常见工作流

容易遗忘的操作

pr贡献

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#仓库设置
git remote -v
git remote set-url origin https://github.com/Zane-Jiang/tpu-mlir.git
git remote add upstream https://github.com/sophgo/tpu-mlir.git

#远程仓库更新与同步
# pull = fetch + merge
git fetch upstream
git checkout main
git merge upstream/main
git push origin main
#或
git fetch upstream
git checkout my-feature
git rebase upstream/main #或 git rebase upstream/release_vX
git push --force-with-lease

#pr二次修改
git checkout my-feature
# 修改代码
git commit -am "fix review comments"
git push
#PR 会自动更新,不用重新提


#例:在远处pr的基础上继续修改
git fetch upstream pull/244/head:nanobind-migrate-pr-ref
git checkout -b pr-branch-rebase master
git cherry-pick <commit-hash>
#应用某个commit

git

本站由 Zane Jiang 使用 Stellar 1.33.1 主题创建,一款很棒的 Hexo 主题!

总访问 次 || 本页访问
总访客 人 || 本页访客