[PATCH] D63023: [docs] Add 'git llvm revert' to getting started guide

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 10 09:59:34 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL362966: [docs] Add 'git llvm revert' to getting started guide (authored by rupprecht, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D63023?vs=203604&id=203853#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63023/new/

https://reviews.llvm.org/D63023

Files:
  llvm/trunk/docs/GettingStarted.rst


Index: llvm/trunk/docs/GettingStarted.rst
===================================================================
--- llvm/trunk/docs/GettingStarted.rst
+++ llvm/trunk/docs/GettingStarted.rst
@@ -525,6 +525,26 @@
 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)
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63023.203853.patch
Type: text/x-patch
Size: 1211 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190610/a18cb944/attachment.bin>


More information about the llvm-commits mailing list