1

Some time ago I've created the branch "B", done some commits and pushed to bitbucket. In another place I've already had another version of the same repo, on branch "master", here I just made git pull and somehow the branch "master" was not behind the branch "B", they were at the exact same commit.

How is this possible? Or what I've done wrong with git to behave this way?

Thanks

Totty.js
  • 15,563
  • 31
  • 103
  • 175

2 Answers2

3
git pull

Is the same than:

git fetch
git merge

If you want to download remote branches without merging, you should use:

git fetch

Look at: What is the difference between 'git pull' and 'git fetch'?

Community
  • 1
  • 1
  • oh, thanks then I think that was the problem.. I should use git fetch more.. In this case there was no problem but if I had "production" and "development" and merging them could do some problems. – Totty.js Mar 19 '14 at 12:31
2

I don't quite understand what you did and what you expected from your explanation, but git pull does a git fetch and git merge, it is possible that the merge simply had no conflicts so to you it seemed like they were at the same position.

Emil Davtyan
  • 13,808
  • 5
  • 44
  • 66