tags:

views:

134

answers:

2

I am not using github. We have git setup on our machine.

I created a branch from master called experiment. However when I am trying to do git pull I am getting following message.

> git pull
You asked me to pull without telling me which branch you
want to merge with, and 'branch.experiment.merge' in
your configuration file does not tell me either.    Please
specify which branch you want to merge on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details.

Here is result of git remote show origin

> git remote show origin
* remote origin
  Fetch URL: ssh://git.domain.com/var/git/app.git
  Push  URL: ssh://git.domain.com/var/git/app.git
  HEAD branch: master
  Remote branches:

    experiment      tracked
    master          tracked
  Local branches configured for 'git pull':
    master     merges with remote master
  Local refs configured for 'git push':
    experiment pushes to experiment (local out of date)
    master     pushes to master     (up to date)

As I read the message above experiment is mapped to origin/experiment. And my local repository knows that it is out of date. Then why I am not able to do git pull?

This is how I created this branch

git co -b experiment origin/experiment

+2  A: 

pull

git pull origin experiment

push:

git push origin experiment

Stewie Griffin
Thanks. Does anyone what do I need to so that git pull and git push alone would do the work.
Nadal
you can create GIT alias. For instance, if you are going to use only that experiment branch, you could write a command pull e or smth like this, which would do the same git pull origin experiment. Read here about alias: http://git.wiki.kernel.org/index.php/Aliases
Stewie Griffin
+1  A: 

Check answers for this question for informations and change "master" to "experiment" for your example

MBO