summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Rupprecht <rupprecht@google.com>2019-06-10 17:00:49 +0000
committerJordan Rupprecht <rupprecht@google.com>2019-06-10 17:00:49 +0000
commit13d16b94c6b795d25bfddb8130f13d2284551303 (patch)
treebd9e78a40bf4bd0d6cfc1e58b48b42a68b5350a2
parent8e1f3a0538574d97a660c85cb89a487e6d2c2a38 (diff)
downloadbcm5719-llvm-13d16b94c6b795d25bfddb8130f13d2284551303.tar.gz
bcm5719-llvm-13d16b94c6b795d25bfddb8130f13d2284551303.zip
[docs] Add 'git llvm revert' to getting started guide
Summary: This documents `git llvm revert rNNNNNN` in the getting started guide for broader visibility. Reviewers: jyknight, mehdi_amini Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63023 llvm-svn: 362966
-rw-r--r--llvm/docs/GettingStarted.rst20
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/docs/GettingStarted.rst b/llvm/docs/GettingStarted.rst
index 5901d28aa28..524a3c250b3 100644
--- a/llvm/docs/GettingStarted.rst
+++ b/llvm/docs/GettingStarted.rst
@@ -525,6 +525,26 @@ through all the steps of committing _without_ actually doing the commit, and
tell you what it would have done. That can be useful if you're unsure whether
the right thing will happen.
+Reverting a change when using Git
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+If you're using Git and need to revert a patch, Git needs to be supplied a
+commit hash, not an svn revision. To make things easier, you can use
+``git llvm revert`` to revert with either an SVN revision or a Git hash instead.
+
+Additionally, you can first run with ``git llvm revert -n`` to print which Git
+commands will run, without doing anything.
+
+Running ``git llvm revert`` will only revert things in your local repository. To
+push the revert upstream, you still need to run ``git llvm push`` as described
+earlier.
+
+.. code-block:: console
+
+ % git llvm revert rNNNNNN # Revert by SVN id
+ % git llvm revert abcdef123456 # Revert by Git commit hash
+ % git llvm revert -n rNNNNNN # Print the commands without doing anything
+
Checkout via SVN (deprecated)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OpenPOWER on IntegriCloud