Skip to content

Instantly share code, notes, and snippets.

@lucmann
Last active August 1, 2024 00:05
Show Gist options
  • Select an option

  • Save lucmann/b39c32eb9bcb22ffa0a7b2b38738c8c6 to your computer and use it in GitHub Desktop.

Select an option

Save lucmann/b39c32eb9bcb22ffa0a7b2b38738c8c6 to your computer and use it in GitHub Desktop.
linux trees
$ git remote -v
amd git@gitlab.freedesktop.org:agd5f/linux.git (fetch)
amd git@gitlab.freedesktop.org:agd5f/linux.git (push)
drm git://anongit.freedesktop.org/drm/drm (fetch)
drm git://anongit.freedesktop.org/drm/drm (push)
drm-misc git://anongit.freedesktop.org/drm/drm-misc (fetch)
drm-misc git://anongit.freedesktop.org/drm/drm-misc (push)
mlankhorst git://people.freedesktop.org/~mlankhorst/linux (fetch)
mlankhorst git://people.freedesktop.org/~mlankhorst/linux (push)
riscv git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git (fetch)
riscv git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git (push)
stable git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git (fetch)
stable git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git (push)
upstream git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git (fetch)
upstream git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git (push)
# List all branches in a specific remote tree (e.g. amd)
$ git ls-remote --heads amd
# List all tags in a specific remote tree (e.g. amd)
$ git ls-remote --tags amd
# Checkout a specific branch in a specific remote tree (e.g. amd's dev branch)
$ git checkout --track amd/amd-staging-drm-next
amd git@gitlab.freedesktop.org:agd5f/linux.git (fetch)
amd git@gitlab.freedesktop.org:agd5f/linux.git (push)
drm git://anongit.freedesktop.org/drm/drm (fetch)
drm git://anongit.freedesktop.org/drm/drm (push)
drm-misc git://anongit.freedesktop.org/drm/drm-misc (fetch)
drm-misc git://anongit.freedesktop.org/drm/drm-misc (push)
mlankhorst git://people.freedesktop.org/~mlankhorst/linux (fetch)
mlankhorst git://people.freedesktop.org/~mlankhorst/linux (push)
riscv git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git (fetch)
riscv git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux.git (push)
stable git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git (fetch)
stable git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git (push)
upstream git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git (fetch)
upstream git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git (push)
@lucmann
Copy link
Copy Markdown
Author

lucmann commented Aug 1, 2024

add these trees as my remotes with one-line command:

awk 'NR % 2 { cmd = "git remote add "$1" "$2; system(cmd) }' linux-trees.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment