[llvm] b2d733c - [llvm][docs] Add step by step git to GettingStarted

Zola Bridges via llvm-commits llvm-commits at lists.llvm.org
Tue May 19 12:15:14 PDT 2020


Author: Zola Bridges
Date: 2020-05-19T12:14:17-07:00
New Revision: b2d733c350782cbdcc5684bb93e9c27cadc3a649

URL: https://github.com/llvm/llvm-project/commit/b2d733c350782cbdcc5684bb93e9c27cadc3a649
DIFF: https://github.com/llvm/llvm-project/commit/b2d733c350782cbdcc5684bb93e9c27cadc3a649.diff

LOG: [llvm][docs] Add step by step git to GettingStarted

Summary:
Due to deleting the git llvm script, folks were asking for better documentation
about how to use git in order to commit to the Github repo. I added some step
by step git commands to make the usage clearer.

Context link: http://lists.llvm.org/pipermail/llvm-dev/2020-May/141640.html

Reviewed By: spatel, mehdi_amini

Differential Revision: https://reviews.llvm.org/D80088

Added: 
    

Modified: 
    llvm/docs/GettingStarted.rst

Removed: 
    


################################################################################
diff  --git a/llvm/docs/GettingStarted.rst b/llvm/docs/GettingStarted.rst
index fbcb7aa86cad..46e337d2cec9 100644
--- a/llvm/docs/GettingStarted.rst
+++ b/llvm/docs/GettingStarted.rst
@@ -496,10 +496,28 @@ required access rights. See `committing a change
 `obtaining commit access <DeveloperPolicy.html#obtaining-commit-access>`_
 for commit access.
 
+Here is an example workflow using git. This workflow assumes you have an
+accepted commit on the branch named `branch-with-change`.
+
+.. code-block:: console
+
+  # Go to the branch with your accepted commit.
+  % git checkout branch-with-change
+  # Rebase your change onto the latest commits on Github.
+  % git pull --rebase origin master
+  # Rerun the appropriate tests if needed.
+  % ninja check-$whatever
+  # Check that the list of commits about to be pushed is correct.
+  % git log origin/master...HEAD --oneline
+  # Push to Github.
+  % git push origin HEAD:master
+
 LLVM currently has a linear-history policy, which means that merge commits are
 not allowed. The `llvm-project` repo on github is configured to reject pushes
 that include merges, so the `git rebase` step above is required.
 
+Please ask for help if you're having trouble with your particular git workflow.
+
 Bisecting commits
 ^^^^^^^^^^^^^^^^^
 


        


More information about the llvm-commits mailing list