Skip to content

Commit dc1f274

Browse files
authored
Update GettingStarted.rst doc with negative refspec to filter user branches
1 parent 1d608fc commit dc1f274

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

llvm/docs/GettingStarted.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,14 @@ Getting the Source Code and Building LLVM
4040

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

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

46-
``sed 's#fetch = +refs/heads/\*:refs/remotes/origin/\*#fetch = +refs/heads/main:refs/remotes/origin/main#' -i llvm-project/.git/config``
47+
.. code-block:: console
48+
49+
git config --add remote.origin.fetch '^refs/heads/users/*'
50+
git config --add remote.origin.fetch '^refs/heads/revert-*'
4751
4852
#. Configure and build LLVM and Clang:
4953

0 commit comments

Comments
 (0)