Skip to content

Commit e610d1e

Browse files
zbridmemfrob
authored andcommitted
[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
1 parent aaeb4af commit e610d1e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

llvm/docs/GettingStarted.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,10 +496,28 @@ required access rights. See `committing a change
496496
`obtaining commit access <DeveloperPolicy.html#obtaining-commit-access>`_
497497
for commit access.
498498

499+
Here is an example workflow using git. This workflow assumes you have an
500+
accepted commit on the branch named `branch-with-change`.
501+
502+
.. code-block:: console
503+
504+
# Go to the branch with your accepted commit.
505+
% git checkout branch-with-change
506+
# Rebase your change onto the latest commits on Github.
507+
% git pull --rebase origin master
508+
# Rerun the appropriate tests if needed.
509+
% ninja check-$whatever
510+
# Check that the list of commits about to be pushed is correct.
511+
% git log origin/master...HEAD --oneline
512+
# Push to Github.
513+
% git push origin HEAD:master
514+
499515
LLVM currently has a linear-history policy, which means that merge commits are
500516
not allowed. The `llvm-project` repo on github is configured to reject pushes
501517
that include merges, so the `git rebase` step above is required.
502518

519+
Please ask for help if you're having trouble with your particular git workflow.
520+
503521
Bisecting commits
504522
^^^^^^^^^^^^^^^^^
505523

0 commit comments

Comments
 (0)