Setting up active branches in SourceTree and GitBucket
Asked by Drew:

Hello Community.

I'm trying to set up branches so that when my employees first clone the repository they have all the branches available. This is how I want to set it up:

Have the Master branch that they don't and/or can't mess with. I'll be the one that syncs up working versions to that branch. Kind of like the release versions. We don't work out of the Master just in case something breaks we have a back up. But I want a development branch as a parent to development.username branch. They work in development.username (each will have a unique username) and they all sync their work to development when they've completed a task. The development branch will later be synced up to Master branch.

What I'm having trouble doing is getting the branches to show up in SourceTree automatically so that they don't have to set them up. I'm trying to make it as easy as possible for them. Every time I clone the repository only the main branch is showing up, as main branch (whatever that branch was set to be; development, master, etc.) is the only active branch in GitBucket. I've worked under someone that set up SourceTree like this so I know it's possible. I just can't seem to figure it out or find more recent tutorials on branches. Unless I'm not remembering correctly, I'm pretty sure I worked under someone who did just that.

How would I accomplish what I'm trying to do?


Answers:
author: Tim Crall
body: I don't think there's an easy way to make SourceTree actually clone down all the branches - that's not standard Git behavior and there's not even an easy way to do it in Git, really - but you can make sure that you've enabled the "Show Remote Branches" option which will at least then show that the remote branches exist - and allow your developers to easily pull them down by double clicking on them.

Here, I have a fresh-cloned repo. The only branch I have actually have locally is master.

Screen Shot 2015-12-04 at 10.11.25 AM.png

But within SourceTree, I've enabled "Show Remote Branches", so I can see that feature/a exists remotely

Screen Shot 2015-12-04 at 10.10.41 AM.png

I double click on it and I can easily pull it, creating a local tracking branch, and check it out at the same time:

Screen Shot 2015-12-04 at 10.10.58 AM.png

Now I have a local copy of that branch:

Screen Shot 2015-12-04 at 10.11.38 AM.png  
[](https://community.atlassian.com/t5/Sourcetree-questions/Setting-up-active-branches-in-SourceTree-and-GitBucket/qaq-p/335953?attachment-id=6949){#link_11738171fc58c7}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/10048/1/Screen%20Shot%202015-12-04%20at%2010.11.38%20AM.png){#display_11738171fc58c7_0}  
[](https://community.atlassian.com/t5/Sourcetree-questions/Setting-up-active-branches-in-SourceTree-and-GitBucket/qaq-p/335953?attachment-id=6950){#link_11738171fc58c7_0}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/10048/2/Screen%20Shot%202015-12-04%20at%2010.11.25%20AM.png){#display_11738171fc58c7_2}  
[](https://community.atlassian.com/t5/Sourcetree-questions/Setting-up-active-branches-in-SourceTree-and-GitBucket/qaq-p/335953?attachment-id=6951){#link_11738171fc58c7_1}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/10048/3/Screen%20Shot%202015-12-04%20at%2010.10.41%20AM.png){#display_11738171fc58c7_4}  
[](https://community.atlassian.com/t5/Sourcetree-questions/Setting-up-active-branches-in-SourceTree-and-GitBucket/qaq-p/335953?attachment-id=6952){#link_11738171fc58c7_2}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/10048/4/Screen%20Shot%202015-12-04%20at%2010.07.04%20AM.png){#display_11738171fc58c7_6}  
[](https://community.atlassian.com/t5/Sourcetree-questions/Setting-up-active-branches-in-SourceTree-and-GitBucket/qaq-p/335953?attachment-id=6953){#link_11738171fc58c7_3}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/10048/5/Screen%20Shot%202015-12-04%20at%2010.10.58%20AM.png){#display_11738171fc58c7_8}

comments: author: Drew
body: Thanks for the reply. Yeah, Show Remote Branches was set as the default. So I'm guessing it means I'll have to have each of them set up their local SourceTree individually?


Tags: git

version