aboutsummaryrefslogtreecommitdiff
path: root/docs/contributing.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/contributing.rst')
-rw-r--r--docs/contributing.rst16
1 files changed, 14 insertions, 2 deletions
diff --git a/docs/contributing.rst b/docs/contributing.rst
index 77a4bf1c3..beb43f1de 100644
--- a/docs/contributing.rst
+++ b/docs/contributing.rst
@@ -373,8 +373,8 @@ Running local presubmits
To speed up the review process, consider adding :ref:`module-pw_presubmit` as a
git push hook using the following command:
-**Linux/macOS**
-
+Linux/macOS
+^^^^^^^^^^^
.. code:: bash
$ pw presubmit --install
@@ -398,6 +398,18 @@ example) you may push using this command:
$ git push origin HEAD:refs/for/main --no-verify
+Presubmit and branch management
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+When creating new feature branches, make sure to specify the upstream branch to
+track, e.g.
+
+.. code:: bash
+
+ $ git checkout -b myfeature origin/main
+
+When tracking an upstream branch, ``pw presubmit`` will only run checks on the
+modified files, rather than the entire repository.
+
.. _Sphinx: https://www.sphinx-doc.org/
.. inclusive-language: disable