Skip to content

Update GettingStarted.rst doc with negative refspec to filter user branches #75015

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions llvm/docs/GettingStarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,14 @@ Getting the Source Code and Building LLVM

``git clone --depth 1 https://github.com/llvm/llvm-project.git``

* You are likely only interested in the main branch moving forward, if
you don't want `git fetch` (or `git pull`) to download user branches, use:
* You are likely not interested in the user branches in the repo (used for
stacked pull-requests and reverts), you can filter them from your
`git fetch` (or `git pull`) with this configuration:

``sed 's#fetch = +refs/heads/\*:refs/remotes/origin/\*#fetch = +refs/heads/main:refs/remotes/origin/main#' -i llvm-project/.git/config``
.. code-block:: console

git config --add remote.origin.fetch '^refs/heads/users/*'
git config --add remote.origin.fetch '^refs/heads/revert-*'

#. Configure and build LLVM and Clang:

Expand Down