12

I forked a repo from github.com, and also had set the upstream remote. Below is my repo

[ Leezhm LIZHM ~/Developments/OF_GIT ] git remote -v
origin  git@github.com:leezhm/openFrameworks.git (fetch)
origin  git@github.com:leezhm/openFrameworks.git (push)
upstream    https://github.com/openframeworks/openFrameworks.git (fetch)
upstream    https://github.com/openframeworks/openFrameworks.git (push)

when I used this command

git fetch upstream develop
git merge upstream/mac8

It always got the following error

fatal: 'upstream/mac8' does not point to a commit
leezhm
  • 133
  • 1
  • 1
  • 7
  • 5
    what does 'git branch -ar' tell you? – jolivier Aug 08 '12 at 16:39
  • I see [no branch of that name on github](https://github.com/openframeworks/openFrameworks/branches). – MvG Aug 09 '12 at 12:36
  • '[ Leezhm LIZHM ~/Developments/OF_GIT ] git branch -ar origin/HEAD -> origin/master origin/develop origin/mac8 origin/master origin/win7 upstream/develop upstream/master' – leezhm Aug 09 '12 at 17:10
  • This doesn't solve your problem directly, but it helped me solve a similar problem: http://stackoverflow.com/questions/2452226/master-branch-and-origin-master-have-diverged-how-to-undiverge-branches – Matthew Cornell Apr 10 '13 at 13:01

3 Answers3

6

You are just fetching upstream/develop, while you want to fetch origin to have origin/mac8 available.

mgarciaisaia
  • 14,521
  • 8
  • 57
  • 81
2

git fetch
git checkout "new brach"
git pull "new branch"
git merge "new branch"

This is worked for me

Guru
  • 1,303
  • 18
  • 32
0

There is probably no corresponding branch in origin/xxx.

scvalex
  • 14,931
  • 2
  • 34
  • 43
Flyakite
  • 109
  • 8