RSSAmplifier

binarycat · May 27, 2025

git: How to fetch a remote branch

0
Sign in to vote or save

This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.

Yet Another Guide because existing ones don't work with shallow clones.

To fetch a specific remote branch and associate it with a local branch, use git fetch REMOTE_NAME REMOTE_BRANCH:LOCAL_BRANCH.

This should work with all repos, including shallow repos.


#git #tutorial


You can follow this blog via its RSS feed or by searching for @binarycat@paper.wf on your Mastodon/ActivityPub instance.

Read on paper.wf

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.