Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to work with two different BitBucket accounts in SourceTree

I have two different bitbucket accounts set up. One is for work projects and one is for personal use. In BitBucket I have set up a repository in each of the accounts for different projects.

In SourceTree I have a few existing personal projects that are syncing up to my personal repository on SourceTree. In the left hand panel I can see my "Develop" branch for one of those personal projects and on the remote in BitBucket I can see the remote repo.

In SourceTree I don't see an obvious way to keep my two accounts separate. For example, I have added the work repo in SourceTree but when I try to commit an initial version of a work project it only gives me the option to commit my personal project branch.

How can I now add my work repo locally and sync only those work projects into repos on that work BitBucket account?

like image 945
motionpotion Avatar asked Sep 27 '13 10:09

motionpotion


People also ask

Can I merge two Bitbucket accounts?

1 answer. Hi Ryan, at the moment it's not possible to move users to a different LDAP, nor to merge existing users. We have a Feature request to allow users to be migrated from one directory to another, you can vote for it at BSERV-5195.

Does SourceTree require a Bitbucket account?

As of version 3.0. 7 Atlassian removed the option to sign up using an Atlassian ID (see Sourcetree release notes), you now need either Bitbucket Server or Bitbucket Cloud account to complete the install. You could download 2.6. 10, complete the install using an Atlassian ID and then upgrade to the latest version.


2 Answers

For SourceTree 2.0.2+ on Mac only with GitHub accounts:

  1. Click from menu File-> New/Clone
  2. In the dialog click settings icon.

  1. In the resulting popup menu click Settings
  2. It brings a dialog with listing user accounts. Add your additional account to the list.
  3. Close the dialog.
  4. Click remote button (next to local) on the tool in image shown below.

All your added accounts will be listed and their respective repositories with button to clone.

Hope this helps.

like image 178
Saran Avatar answered Oct 11 '22 13:10

Saran


NOW on Windows, you do it in the Clone/Add/Create Repository dialog:

  1. Click the "Hosted Repositories" button (internet icon)
  2. Click "Edit Accounts"
  3. Click "Add"

enter image description here

like image 42
Brent McFerrin Avatar answered Oct 11 '22 13:10

Brent McFerrin