Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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
like image 805
leezhm Avatar asked Aug 08 '12 16:08

leezhm


2 Answers

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

like image 198
mgarciaisaia Avatar answered Oct 17 '22 12:10

mgarciaisaia


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

This is worked for me

like image 33
Guru Avatar answered Oct 17 '22 12:10

Guru