0

When I cloned single branch. When needing to merge from other branch, other branches doesn't show up.

git clone --single-branch --branch release/2.0.0 https://some-repo.com/***.git

Nor git checkout other-branch recognizes other existing branches on remote.

Can I checkout other branches with-in same folder? Is there a command?

UPDATE:

I did try the solution posted here:

git fetch origin release/2.0.0 release/2.0.0

https://stackoverflow.com/a/67998814/1431250

Result:

git checkout release/2.0.0 error: pathspec 'release/2.0.0' did not match any file(s) known to git

enter image description here

Abhijeet
  • 13,562
  • 26
  • 94
  • 175
  • 1
    Does this answer your question? [GIT: Checkout to a specific folder](https://stackoverflow.com/questions/4479960/git-checkout-to-a-specific-folder) – Ecstasy Jan 21 '22 at 07:01
  • @DeepDave-MT No Updated outcome above. – Abhijeet Jan 21 '22 at 07:03
  • 1
    You didn't follow the instructions. It says `git fetch origin development:development`. You ran `git fetch origin release/2.0.0 release/2.0.0`. It should be `git fetch origin release/2.0.0:release/2.0.0`. – ElpieKay Jan 21 '22 at 07:07
  • https://stackoverflow.com/search?q=%5Bgit%5D+undo+single+branch – phd Jan 21 '22 at 19:16
  • Note that while it's possible to do this without "undoing" the single-branch-ness, it's *better*, for most users, to just undo the single-branch-ness. – torek Jan 21 '22 at 21:59

0 Answers0