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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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: https://youtu.be/m0rhpG6Skac

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
TAGS
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,922 views 0 7
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