
You have cloned a repo maybe using shallow clone with git clone --depth <depth> <repo> implies --single-branch,
But strangely when you are trying to fetch from remote, it's not working.
To fix a local repo that's not fetching try:
or
git config remote.upstream.fetch "+refs/heads/*:refs/remotes/upstream/*"
git config --get remote.upstream.fetch
git fetch
To prevent this from happening in the future, As noted in the man page git-clone(1), so we'd better do it with git clone --depth <depth> --no-single-branch <repo>.
Reference: Stackoverflow
About the author
I will raise your revenues or decrease your costs using solutions based on logic and in most cases, it will involve a computer. Design - Build - Improve.
I design solutions to your business problem, build it with you and your team and finally scale the solution to fix other related problems.
I use Javascript and Python as the main languages for development but I am eager and faster to learn anything that would be put a solution on the table.
Comments
Join the discussionNo comments yet. Be the first to comment.
Quick Bits
This series include short articles and tutorials. The purpose of these articles is to help you quickly solve an issue or learn an easy concept.


