Github has an admin setting to make a specific branch the "default" branch. We don't want people to ever check code into master, only "dev". So I'd like to make "dev" the default branch.
Does Stash have a way to do this?
Yes, in the settings for a repository you can specifiy the default branch for browsing. That doesn't prevent people from commiting to master though.
For this Stash also has allows you to limit write access to certain branches by setting up branch permissions: https://confluence.atlassian.com/display/STASH/Using+branch+permissions
Hope this helps!
You can get the repo's default branch via the REST api (/rest/api/1.0/projects/[PROJECT]/repos/[REPO]/branches/default).
Thanks that seems to work great. If you are interested, vis ScriptRunner or a Groovy Script, I am able to get the branch information this way too.
def repositoryService = ComponentLocator.getComponent(RepositoryService.class);
def refService = ComponentLocator.getComponent(RefService.class);
Repository rep = repositoryService.getBySlug("UP","myrepo");
int id = rep.getId();
// This returns a Branch Object refService.getDefaultBranch(rep).getDisplayId();
It should be on the first/main repository settings page/tab. You can see the branch selector here in this screenshot down the bottom right:
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...
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!
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