Pulling a branch created on a different workstation has caused some issues, a little help?

(I am new to source control so please forgive me for any terminology or procedural blunders)

Last night I created a New branch when working in my home office. I made some edits and committed the Branch and pushed it to the remote. When I arrived at my other office this morning I 'pulled' the new remote branch but under options I did not uncheck the commit merged changes immediately. This seems to have 'merged' the changes from the remote branch back into the master branch which I did NOT want to do, I wanted to continue working on the New branch keeping it separate from the master. On my Work computer it now shows a [2] on the Push Icon when I am on the master branch and there was No New branch. I Then Selected the Remote Repo and checked out the new branch and it is now appearing in my local repo, I think that is now solved.

How do I get my Master branch on this system back to 'normal'? There should be NO changes waiting to be pushed on this system for the master branch...

1 answer

0 vote

Hi Michael, are you using Git? In that case, git revert or git reset could be good options for you, you can read more about them at  Undoing changes I encourage you to always have a copy of your repos before performing any of these operations, just in case ;)

In any case, note that this is actually a Git question and not a Sourcetree question, as this is related directly to the way Git works and Sourcetree is just a graphical tool for Git :)

Hope that helps!

Ana

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

649 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you