This works around the ancient Git's failure to update upstream/stable. Run git fetch upstream stable, but then run git merge FETCH_HEAD instead of git merge upstream/stable. (This works even if upstream is set up as a single-branch remote, and is needed even in modern Git if upstream is set up as a single-branch remote.) Then proceed as before. This will force git fetch to update upstream/stable. Run git fetch upstream +refs/heads/stable:refs/remotes/upstream/stable. In particular it should not be a single-branch remote. Note: this depends on your settings for upstream. Then proceed as you were doing before, by merging upstream/stable. This will fetch everything and update everything, including upstream/stable. Run git fetch upstream instead of git fetch upstream stable. To fix the problem, use any one of the following: Here, git fetch upstream stable fails to update upstream/stable so that git merge upstream/stable does no good. Run git -version if the output says you have Git 1.7, or 1.8 before 1.8.4 (e.g., 1.8.3.1), you have this kind of truly ancient Git. Watch out for old CentOS (and RH7) systems, on which the Git supplied is ancient. In the same way, I suppose sometimes Git might show you the phrase origin/stable even when remotes/origin/stable is meant. If you say origin/stable, that is a bit less formal, so Git hunts around for something that you might mean and decides that you probably mean remotes/origin/stable. Git tries to fill in the gap when you are less formal. Git has various levels of formality for what you see and can say. So git fetch first and then you can git merge (or whatever it was you wanted to do).Īlso I"m not really sure what the difference is between the upstream/stable and remotes/origin/stable So until you git fetch upstream, it won't necessarily contain recent commits that exist back at the upstream server. It is a "remote-tracking" branch, but it is not remote from this repo it lives here, not at the upstream server. Note that remotes/upstream/stable is local - it isn't a "local branch" but it is locally held. If these names represent the end commits of branches that have diverged from one another at some point in history and the idea is to play out both sets of commits since that point, that is git merge. remotes/upstream/stable and develop are both the names of commits. It traffics in commits, which are snapshots, some of which have names. There is no such thing as "pull changes". How do I pull all the changes from remotes/upstream/stable to my develop branch?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |