-1

Today i ran pull option from eclipse, but i did not get any changes from server, even though i see the changes are there in my current branch. I tried the same command git pull from git bash but that also said everything is up-to-date. However when i ran the git pull origin branch1 i got all the changes to my local.

What's the difference between git pull and git pull origin branch1 when i am running this command from my current branch?

How do i tell eclipse to run git pull origin <current_batch> when i chose pull option from UI.

Jigar Naik
  • 1,946
  • 5
  • 29
  • 60

1 Answers1

1

Here is my take: "git pull" fetches the data from master branch (if you have not set any default upstream). Whereas "git pull origin branch1" fetches the data from the branch "branch1".

If you want "git pull" to fetch data from your branch, then you can set your branch as default upstream using the command "git branch --set-upstream my_branch origin/my_branch".

I hope that helps!

harsh pamnani
  • 1,191
  • 1
  • 10
  • 14