diff options
author | Mehdi Amini <joker.eph@gmail.com> | 2024-03-12 15:18:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-12 15:18:47 -0700 |
commit | 76f3a084e77991cffbb8108959457ffd75f8e9c8 (patch) | |
tree | 1381e51d6c209ada50cb4da9bf2e86c939d74579 | |
parent | d73c2d5df21735805a1f46a85790db64c0615e1c (diff) | |
download | llvm-76f3a084e77991cffbb8108959457ffd75f8e9c8.zip llvm-76f3a084e77991cffbb8108959457ffd75f8e9c8.tar.gz llvm-76f3a084e77991cffbb8108959457ffd75f8e9c8.tar.bz2 |
Update GettingStarted.rst doc with negative refspec to filter user branches (#75015)
This allows to keep fetching release branches as well.
-rw-r--r-- | llvm/docs/GettingStarted.rst | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/docs/GettingStarted.rst b/llvm/docs/GettingStarted.rst index 705f642..7ecef78 100644 --- a/llvm/docs/GettingStarted.rst +++ b/llvm/docs/GettingStarted.rst @@ -42,10 +42,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: |