# Forbidding feature branches on JuliaLang/julia repo

**URL:** https://discourse.julialang.org/t/forbidding-feature-branches-on-julialang-julia-repo/53154
**Category:** Internals & Design
**Created:** [January 11, 2021, 11:47am UTC](https://discourse.julialang.org/t/forbidding-feature-branches-on-julialang-julia-repo/53154 "2021-01-11T11:47:02Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![oxinabox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oxinabox/32/206603_2.png) [@oxinabox](https://discourse.julialang.org/u/oxinabox)
#### Post date: [January 11, 2021, 11:47am UTC](https://discourse.julialang.org/t/forbidding-feature-branches-on-julialang-julia-repo/53154/1 "2021-01-11T11:47:02Z")

</div>

Right now the [JuliaLang/julia has 914 branches](https://github.com/JuliaLang/julia/branches).  
I am pretty suire the majority of which are stale feature branches,  
where someone started to implement a feature and then for some reason stopped.  
Taking a look, in many cases they even stopped without even openning a PR.  
(Also in a lot of cases the PR is closed)

Compare to [ruby](https://github.com/ruby/ruby/branches), there are 23 branches, each one just for a release.  
[Rust](https://github.com/rust-lang/rust/branches/all) normally looks similar though right now they have a few extras, I am not sure what is up with that (maybe some hotfixes).  
[cpython](https://github.com/python/cpython/branches/all) also.

The reason we have so many more is because people with merge rights tend to create feature branchs on JuliaLang/julia, rather than in their own forks.  
Where as people without merge rights do use their own forks.  
Where as in all the other language repos i mention, everyone (merge rights or not) create feature branches on their forks.  
I think we should be like them.

Its not a huge deal, but it is just kind of annoying when:

- Looking for release-1.6 in the dropdown branch menu on github
- managing my own branches and swapping between them locally
- Pulling changes so i can rebase (since it pulls all the things anyone is working on)

There are ways to work around all of this, like extra git flags (`--singlebranch` etc)  
but i still think it would be better to just save `JuliaLang/julia` just for master and the release branches,  
and do all the feature development on forks.

* * *

I propose we do 3 things:

1. develop some kind of policy like the above
2. Workout if we can enforce it (e.g. some setting where fewer people can create branchs?)
3. Delete all stale branchs from the repo
4. Repeat step 3 every month until all feature branches are gone

---

<div class="post-metadata">

### Author: ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)
#### Post date: [January 11, 2021, 11:50am UTC](https://discourse.julialang.org/t/forbidding-feature-branches-on-julialang-julia-repo/53154/2 "2021-01-11T11:50:50Z")

</div>

+1 for this. It definitely is an avoidable annoyance.

---

<div class="post-metadata">

### Author: ![Skoffer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/skoffer/32/378_2.png) [@Skoffer](https://discourse.julialang.org/u/Skoffer)
#### Post date: [January 11, 2021, 11:53am UTC](https://discourse.julialang.org/t/forbidding-feature-branches-on-julialang-julia-repo/53154/3 "2021-01-11T11:53:05Z")

</div>

Agreed, it should be cleaned up.

---

<div class="post-metadata">

### Author: ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)
#### Post date: [March 22, 2021, 9:53am UTC](https://discourse.julialang.org/t/forbidding-feature-branches-on-julialang-julia-repo/53154/4 "2021-03-22T09:53:06Z")

</div>

Has there been progress on this / has this been seen and accepted by the core devs? There clearly still are (way too) many feature branches in the Julia repo.

---

<div class="post-metadata">

### Author: ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)
#### Post date: [March 25, 2021, 5:27pm UTC](https://discourse.julialang.org/t/forbidding-feature-branches-on-julialang-julia-repo/53154/5 "2021-03-25T17:27:39Z")

</div>

Don’t think any Julia devs decided this was a problem. I guess I would be ok with using a fork to make PRs since the `gh` tool now makes that fairly easy.

---

<div class="post-metadata">

### Author: ![innerlee](https://avatars.discourse-cdn.com/v4/letter/i/b19c9b/32.png) [@innerlee](https://discourse.julialang.org/u/innerlee)
#### Post date: [March 26, 2021, 1:51pm UTC](https://discourse.julialang.org/t/forbidding-feature-branches-on-julialang-julia-repo/53154/6 "2021-03-26T13:51:02Z")

</div>

Don’t agree 😄

---

<div class="post-metadata">

### Author: ![oxinabox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oxinabox/32/206603_2.png) [@oxinabox](https://discourse.julialang.org/u/oxinabox)
#### Post date: [June 1, 2021, 5:42pm UTC](https://discourse.julialang.org/t/forbidding-feature-branches-on-julialang-julia-repo/53154/7 "2021-06-01T17:42:48Z")

</div>

Perhaps we could make this a thing.  
(was reminded about this after I was confused to day by the random `release-1.6.0` branch that seems to be a mistake (`release-1.6` is the real branch)).  
And maybe bring it as a rule into effect as of 1.7 release or as of JuliaCon 2021?

> [@oxinabox](#):
>
> I propose we do 3 things:
> 
> 1. develop some kind of policy like the above
> 2. Workout if we can enforce it (e.g. some setting where fewer people can create branchs?)
> 3. Delete all stale branchs from the repo
> 4. Repeat step 3 every month until all feature branches are gone

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [June 1, 2021, 8:23pm UTC](https://discourse.julialang.org/t/forbidding-feature-branches-on-julialang-julia-repo/53154/8 "2021-06-01T20:23:40Z")

</div>

👎 This has many annoyances for people working regularly on Julia and the arguments for it seems to be extremely easy to workaround.

Like

> [@oxinabox](#):
>
> - Looking for release-1.6 in the dropdown branch menu on github

Type in `1.6` in the search field? You would probably do that any way because there are enough release branches.

---

<div class="post-metadata">

### Author: ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)
#### Post date: [June 1, 2021, 8:28pm UTC](https://discourse.julialang.org/t/forbidding-feature-branches-on-julialang-julia-repo/53154/9 "2021-06-01T20:28:30Z")

</div>

> [@kristoffer.carlsson](#):
>
> This has many annoyances for people working regularly on Julia

Could you explain the use cases and the problems this change would introduce?

---

<div class="post-metadata">

### Author: ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)
#### Post date: [June 2, 2021, 5:50pm UTC](https://discourse.julialang.org/t/forbidding-feature-branches-on-julialang-julia-repo/53154/10 "2021-06-02T17:50:05Z")

</div>

> [@kristoffer.carlsson](#):
>
> This has many annoyances for people working regularly on Julia

Speaking for myself (and not related to Julia since I’m not a committer), I regularly open pull requests from forks rather branches in the upstream repository when I do have commit access to upstream. I find that much more useful and safe, especially because I set (well, [Magit](https://magit.vc/) does that for me) `pushurl` to use the SSH protocol only for the fork, while I use HTTPS for all the other URLs, so that I can think twice if I get the username/password prompt because I’m pushing to upstream instead of the fork.

Exceptions to my habit include repositories that I moved from my account to organisations and for which I don’t want to break the redirect by creating a fork, but I guess that’s not a concern for most Julia committers.

---

<div class="post-metadata">

### Author: ![oxinabox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oxinabox/32/206603_2.png) [@oxinabox](https://discourse.julialang.org/u/oxinabox)
#### Post date: [June 27, 2021, 12:03pm UTC](https://discourse.julialang.org/t/forbidding-feature-branches-on-julialang-julia-repo/53154/11 "2021-06-27T12:03:20Z")

</div>

> [@kristoffer.carlsson](#):
>
> This has many annoyances for people working regularly on Julia

Please explain what these are.  
Like I would think these are just as annoying for people with commit access as for people without.

Though I guess maybe the annoyance is less for experienced contributors as they probably know to use `git clone ... --single-branch` etc.  
In contrast someone who is making there first PR to fix docs or something is going to get 650 branches from origin and another 650 from their fork, in their face (which makes some git GUIs unhappy (also more likely to be used by someone new)

(For interest, julia has over 1150 conttibutors, I think only 1 person in the top 20 doesn’t have commit rights, but after the top 30 most people don’t.  
Everyone in the top 100 (all github shows) has made multiple commits per year.)
