# Having multiple long-lived branches on GitHub

**URL:** <https://community.sonarsource.com/t/having-multiple-long-lived-branches-on-github/6280>\
**Category:** SonarQube Cloud\
**Tags:** branches, github\
**Created:** [January 29, 2019, 6:02pm UTC](https://community.sonarsource.com/t/having-multiple-long-lived-branches-on-github/6280 "2019-01-29T18:02:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexvicegrab](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/alexvicegrab/32/2356_2.png) [@alexvicegrab](https://community.sonarsource.com/u/alexvicegrab)\
**Post date:** [January 29, 2019, 6:02pm UTC](https://community.sonarsource.com/t/having-multiple-long-lived-branches-on-github/6280/1 "2019-01-29T18:02:06Z")

</div>

I am using SonarCloud with sonar-scanner to analyse projects on GitHub.

We run sonar-scanner via Travis CI every time we do a Pull request.

Since we are using a GitFlow workflow, we have 2 long-lived branches, master and develop, with a myriad of short-lived branches that get merged into develop periodically, and develop is merged ~weekly to master.

On SonarCloud, in the -\> Administation -\> Branches & Pull Requests section I have set the detection pattern for long-lived branches to: `(master|develop).*`

However, I only see the main branch `master`. So this blocks me from using sonar-scanner to merge features into `develop`. If I rename the main branch to `develop`, I’m able to merge feature branches into develop, but merging from `develop` to `master` breaks.

Please help!

P.S. I’m not able to see any branches beyond the main one, for any of my projects. It’s as if none of the branches (short- or long-lived) are detected on GitHub.

---

<div class="post-metadata">

**Author:** ![dmeneses](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/dmeneses/32/2933_2.png) [@dmeneses](https://community.sonarsource.com/u/dmeneses)\
**Post date:** [January 30, 2019, 5:17pm UTC](https://community.sonarsource.com/t/having-multiple-long-lived-branches-on-github/6280/2 "2019-01-30T17:17:39Z")

</div>

Hi,

The sonar-scanner won’t automatically pickup the git branch that is being analyzed.  
Are you passing the appropriate parameters to the scanner?

More information can be found [here](https://docs.sonarqube.org/latest/analysis/pull-request/) for PRs and [here](https://docs.sonarqube.org/latest/branches/overview/) for branches.

---

<div class="post-metadata">

**Author:** ![alexvicegrab](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/alexvicegrab/32/2356_2.png) [@alexvicegrab](https://community.sonarsource.com/u/alexvicegrab)\
**Post date:** [January 31, 2019, 5:05pm UTC](https://community.sonarsource.com/t/having-multiple-long-lived-branches-on-github/6280/5 "2019-01-31T17:05:09Z")

</div>

I think issue is that SonarQube project was created after Develop branch existed, and thus updating the RegEx does not have an impact on its status as long-lived, unfortunately.
