I need to fetch everything from a few different, distinct repositories (all remote branches and all changes to those branches). I tried git pull --all but for some reason, I get the following message:
There are no candidates for merging among the refs that you just fetched.
Generally this means that you provided a wildcard refspec which had no
matches on the remote end.
So how would I go about ensuring that I get all the changes from a repository (without knowing what branches are on the other end, if possible)?
All help is appreciated and thanks in advance!
Generally speaking — that’s a really, really bad idea. Don’t do that. “All remote branches” will often include work-in-progress code, abandoned code, conflicting implementations of the same feature, etc. Trying to merge them all into your local tree is a recipe for disaster.
Now, if you really wanted to do the very silly thing you suggested, you could do it something like thus:
Now, if all you really want to do is have a local copy of all remote changes, without trying to merge them into your tree, then you don’t need to do a pull or merge at all;
git fetch remote_sourcedoes it all for you. Sure, it doesn’t create local branches mapped to the remotes — but it does pull down the remote branches, and you can create local ones when and as you need them, with no further communication with the remote source required.Given further problem description in the comments, it sounds like what you really want is to push all branches from your old remote to a new remote, not to merge them into a single tree. To do this, you’d probably want something like the following: