leezhm
leezhm

Reputation: 133

git merge and got this error "does not point to a commit"

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  [email protected]:leezhm/openFrameworks.git (fetch)
origin  [email protected]: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

Upvotes: 12

Views: 18664

Answers (3)

Guru
Guru

Reputation: 1410

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

This is worked for me

Upvotes: 2

mgarciaisaia
mgarciaisaia

Reputation: 15620

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

Upvotes: 6

Flyakite
Flyakite

Reputation: 139

There is probably no corresponding branch in origin/xxx.

Upvotes: 0

Related Questions