Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

After creating a branch from master I have to sync with master to get its source. Why?

I'm finding that after creating a branch from master that the new branch doesn't have the same source code as master. Ultimately I have to sync the new branch with master after creating the branch to get it to see master's source. Why is that? The steps below show what I'm doing, or I made a movie of this:

1) In Bitbucket (on the website) I create a new branch (BranchB) from master.

2) I fetch and then checkout BranchB locally

3) I create a text file called BranchB.txt and save it.

4) I use git status to verify that git sees the untracked file

5) I add the file, make a commit, and then push the branch to remote

6) I verify in BitBucket that the branch was just updated and then merge with the master branch (presumably master has branchB.txt at this point)

7) I create a new branch from master called BranchC using Bitbucket website

8) I fetch and checkout BranchC locally verifying that I am on that new branch

9) I find that BranchB.txt is NOT THERE. Why is that???

10) On the BitBucket website, I find that BranchC is two commits behind master. Why??

11) I sync BranchC with master (a step I wouldn't have thought necessary)

12) I verify that BranchB.txt now exists in BranchC on remote

13) locally I do a git pull and verify that BranchB.txt exists.

0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,845 views 10 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you