Totty.js
Totty.js

Reputation: 15861

Git is merges branches without specifying it (git pull)

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

Upvotes: 1

Views: 47

Answers (2)

Emil Davtyan
Emil Davtyan

Reputation: 14099

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.

Upvotes: 2

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'?

Upvotes: 3

Related Questions