Short but sweet: you have a shallow git clone like git clone --depth 1 ... and now you want to access another branch. It's not very clear how to do this, but this is the trick: git fetch --depth 1 origin branch:branch That's it. If you don't use the branch:branch syntax, it will fetch the branch contents at your desired depth, but the branch will never actually be created locally so you can't switch to it. Weird!
No comments yet. Log in to reply on the Fediverse. Comments will appear here.