I have a remote repository that I have to clone at depth 1 using git clone --depth 1 [url]
and then use git fetch --unshallow
and git fetch --all
to get the full repository.
The problem is that I can only see branches that I have created locally. I cannot see any remote branches unless I created them locally and pushed them to the remote server. This means that if anything happens to my local repo, I will have to start work on any remote branches all over again.
Edit: This question is answered elsewhere, but I am leaving it up because it asks the question in a different way, making the solution more searchable.
How do I resolve this issue?