aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Pudlik <tpudlik@google.com>2022-04-04 18:55:17 +0000
committerCQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-04-04 20:14:29 +0000
commit4776aec5a9441ac8e4efb461b91d65caff57b3e5 (patch)
treecefdf71a791203aecdbd3b86e98b81d6589b0215
parentd42107620660f84a89cc47e3eae7a6d3ea26208a (diff)
downloadpigweed-4776aec5a9441ac8e4efb461b91d65caff57b3e5.tar.gz
docs: Add advice on presubmit & branches
Tested: By viewing the generated docs in a browser. Fixed: b/223242211 Change-Id: Ia749294e5e9a950814260055ac1a51765a4694ba Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/89900 Pigweed-Auto-Submit: Ted Pudlik <tpudlik@google.com> Reviewed-by: Chad Norvell <chadnorvell@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
-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