Skip to main content

Command Palette

Search for a command to run...

Fix git not updating remote from remote on fetch

Published
1 min read
Fix git not updating remote from remote on fetch
A

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.

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

More from this blog

V

Victor Abz

12 posts

Hello, I am Victor. I am a software engineer with corporate experience. Solution provider for #startups and #enterprise using Javascript (Node JS and React) | Python.