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.
> 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
3 Solutions collect form web for “git pull not working”
git pull origin experiment
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