4 ms·
I think what you want in a pull is really just "git fetch", which will update all remote branches. In case you haven't realized this separation, try "git branc
by CUViper 13y ago
I think what you want in a pull is really just "git fetch", which will update all remote branches. In case you haven't realized this separation, try "git branch -av" to see that your local branch names are distinct from all the "remotes/*" branches. Also, if you have more than one remote repository location, not just origin, then "git remote update" will fetch them all.
Pull is basically the combination of fetch and merge into your local branch. Since there's always a chance for merging to fail and require fixup, it would be dangerous for pull to try all your local branches at once.
- lisper 13y agoAh, that makes sense, thanks. I guess I'm having a hard time getting out of the SVN mindset. I keep forgetting that there may not be any such thing as the remote repo, I can have different branches tracking different remote repos.
- graue 13y agoOfftopic: I didn't know about `git branch -v`. Not something I needed enough to go looking for it, but nifty and good to know! Always learning more Git tricks :)
- snowwrestler 13y agoI always use "fetch" instead of "pull" for this reason--I want to update all my remote branches first, and then consider merging with local branches. It seems that a lot of new git users default to "pull" and I'm not sure why. There must be some really popular tutorial out there that starts with pull.
- vidarh 13y ago"git pull" is the closest equivalent to what people are used to from many other source control systems where there is no concept of a local copy of remote branches.