git pull not working

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.

  • Make .gitignore ignore everything except a few files
  • How to push Tag to Bitbucket Git Repository in Bamboo from Cake build task?
  • Git checkout remote branch of a remote repository
  • How to setup GIT server on Linux Container in Debian
  • Using Git I have two separate changes I am working on — what is the best way to handle this?
  • “Will not add file alias 'samefile' ('SameFile' already exists in index)” when `git add` operation
  • > 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

  • How to find the TeamCity build that contains a given commit to git?
  • Specifying branch arguments to git fetch, merge, and push
  • How to manage configuration files when collaborating?
  • git diff --word-diff with oneline files
  • How to stage all changes in git from with a repo subdirectory
  • Running git diff-tree with --numstat and --name-status
  • 3 Solutions collect form web for “git pull not working”

    Pull:

    git pull origin experiment
    

    Push:

    git push origin experiment
    

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

    I was facing this issue in my eclipse github plugin .

    This might be happening because of some conflict files present in your repository .And you was still trying to check in files .
    So After that what happen , it will check in your local repository not in master repository .
    So u was not able to pull or check in anythings in master(head) repository .

    I have one solution might be useful , it works for me maximum times.
    Just follow these steps :-
    1)right click on conflict file
    2)click on replace with -> head revision
    3)wait for some times (keep patient , it will take time )
    4)repeat all previous steps for all conflict files

    Git Baby is a git and github fan, let's start git clone.