File tree Expand file tree Collapse file tree 2 files changed +39
-5
lines changed Expand file tree Collapse file tree 2 files changed +39
-5
lines changed Original file line number Diff line number Diff line change @@ -118,12 +118,24 @@ For developers to commit changes from Git
118118-----------------------------------------
119119
120120Once a patch is reviewed, you can select the "Squash and merge" button in the
121- GitHub web interface. You might need to rebase your change before pushing
122- it to the repo.
121+ GitHub web interface.
123122
124- LLVM currently has a linear-history policy, which means that merge commits are
125- not allowed. The `llvm-project ` repo on github is configured to reject pushes
126- that include merges, so the `git rebase ` step above is required.
123+ When pushing directly from the command-line to the ``main `` branch, you will need
124+ to rebase your change. LLVM has a linear-history policy, which means
125+ that merge commits are not allowed and the ``main `` branch is configured to reject
126+ pushes that include merges.
127+
128+ GitHub will display a message that looks like this:
129+
130+ .. code-block :: console
131+
132+ remote: Bypassed rule violations for refs/heads/main:
133+ remote:
134+ remote: - Required status check “buildkite/github-pull-requests” is expected.
135+
136+ This can seem scary, but this is just an artifact of the GitHub setup: it is
137+ intended as a warning for people merging pull-requests with failing CI. We can't
138+ disable it for people pushing on the command-line.
127139
128140Please ask for help if you're having trouble with your particular git workflow.
129141
Original file line number Diff line number Diff line change @@ -215,6 +215,28 @@ commonly used first:
215215 this result correctly with a note that a force push did occur.
216216
217217
218+ Pre-merge Continuous Integration (CI)
219+ -------------------------------------
220+
221+ Multiple checks will be applied on a pull-request, either for linting/formatting
222+ or some build and tests. None of these are perfect and you will encounter
223+ false positive, infrastructure failures (unstable or unavailable worker), or
224+ you will be unlucky and based your change on a broken revision of the main branch.
225+
226+ None of the checks are strictly mandatory: these are tools to help us build a
227+ better codebase and be more productive (by avoiding issues found post-merge and
228+ possible reverts). As a developer you're empowered to exercise your judgement
229+ about bypassing any of the checks when merging code.
230+
231+ The infrastructure can print messages that make it seem like these are mandatory,
232+ but this is just an artifact of GitHub infrastructure and not a policy of the
233+ project.
234+
235+ However, please make sure you do not force-merge any changes that have clear
236+ test failures directly linked to your changes. Our policy is still to keep the
237+ ``main `` branch in a good condition, and introducing failures to be fixed later
238+ violates that policy.
239+
218240Problems After Landing Your Change
219241==================================
220242
You can’t perform that action at this time.
0 commit comments