-
Notifications
You must be signed in to change notification settings - Fork 5
Git workflow
Juncheng E edited this page Aug 1, 2023
·
2 revisions
- Branch from the current
main
branch - Identify the official repo as upstream:
git remote rename origin upstream
- Develop into the newly created branch
- Create appropriate unit tests in tests
- Test current development as indicated in the testing document.
git pull upstream main
-
git rebase -i main
w.r.t. current main branch to include the latest updates and squashing commits to a minimum. See also here. - (Optional) Add your own forked repo as a new remote, we name it "FORKED" here, and please replace "GITLINK" with the link of the repo you would like to add:
git remote add FORKED GITLINK
. - Push your
BRANCH
to the upstream repo:git push -f upstream BRANCH
or the forked repo:git push -f FORKED BRANCH
. - Create a pull request (PR) to the
main
branch on the GitHub page. - PR should be reviewed and approved and be passing all CI tests.
- If passing all tests, Choose
Rebase and merge
to merge the PR with no further squashing.