Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Branch confusion

Chuck
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 21, 2025

I've recently started using git, Bitbucket, SourceTree and Xcode after years of being away. For the repo in question, I have two branches, master and develop. I use git commands from both the terminal (macOS) and Xcode. I work in the develop branch and occasionally merge develop to master.

Recently, I committed some changes in Xcode on the develop branch. Then I went to the terminal pushed with either 'git push' or 'git push origin develop.' Next, I realized that 'git branch' showed that my current branch was master. To fix this, I changed the branch to develop and merged from master to develop:

git checkout develop
git merge master
git push origin develop

I thought I fixed the problem and made several commit/pushes on develop. Now when I look at my develop commits in Bitbucket, I see a develop branch icon to the right of the message like this.

 bb develop branch highlight.png

Here's what the History looks like in SourceTree.

SrcTree History.png

Can anyone help me understand what's going on and how to fix it? I think that I need a refresher course in git so, if you have references for that, that would be great as well. Thank you.

1 answer

1 accepted

0 votes
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 22, 2025

Hello @Chuck ,

and welcome to the Community!

The reason why those commits are showing the "develop" branch tag is that those commits are not currently present in the main branch of the repository.

For every commit that is in a branch that was not yet merged to the main branch of a repository, you'll see that tag with the branch name.

The merge from master to develop you executed was successful, as illustrated in the graph by the yellow line meeting the blue line. After that, you pushed additional commits to the develop branch (Updated ..., Fixed..., Updated README file), and those were not yet merged back to the main branch.

This is why they are displayed with the "development" branch tag in the UI. As soon as you merge the develop branch with the main branch again, that tag should disappear. 

As for refreshing the skills on git, Atlassian has a complete series of git tutorials that might be helpful:

I hope this helps! Let us know in case you have any questions.

Thank you, @Chuck !

Patrik S

Chuck
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 24, 2025

Thank you Patrik! That helps immensely. I was convinced that I had done something wrong.

Now, I need to figure out how to stop needing to enter my passphrase in the macOS terminal for many git commands. I think that the solution is here: Set up Repository Access keys on macOS.

 

Like Patrik S likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events