llvm.org GIT mirror llvm / abf16a5
[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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362966 91177308-0d34-0410-b5e6-96231b3b80d8 Jordan Rupprecht a month ago
1 changed file(s) with 20 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
523523 through all the steps of committing _without_ actually doing the commit, and
524524 tell you what it would have done. That can be useful if you're unsure whether
525525 the right thing will happen.
526
527 Reverting a change when using Git
528 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
529
530 If you're using Git and need to revert a patch, Git needs to be supplied a
531 commit hash, not an svn revision. To make things easier, you can use
532 ``git llvm revert`` to revert with either an SVN revision or a Git hash instead.
533
534 Additionally, you can first run with ``git llvm revert -n`` to print which Git
535 commands will run, without doing anything.
536
537 Running ``git llvm revert`` will only revert things in your local repository. To
538 push the revert upstream, you still need to run ``git llvm push`` as described
539 earlier.
540
541 .. code-block:: console
542
543 % git llvm revert rNNNNNN # Revert by SVN id
544 % git llvm revert abcdef123456 # Revert by Git commit hash
545 % git llvm revert -n rNNNNNN # Print the commands without doing anything
526546
527547 Checkout via SVN (deprecated)
528548 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^