Should I change the way I do private branches in osmocom?
I push a lot of private branches everywhere. I was asked in PM if I could cut down on branches a bit because it clutters other developers' view of the git history. My immediate response was: the other developer should simply not fetch my branches, or invoke tig or gitk in a way that shows only selected branches. But I reflected a bit and would like to ask generally how we want to do it.
For osmocom it apparently is mostly me pushing private branches a lot. What if we all did that...
In linux kernel development it seems to be more like each developer has her own public repository to make a mess in.
So, i could make git clones of our main repositories in gitea and keep my private branches there. It seems like maybe i should do that out of common courtesy.
But it also adds a bunch of overhead for me, keeping separate repositories synced. Having multiple remotes affects git commandline behavior. I used to have separate fetch/push URLs for a while, but it was annoying in some ways.
I can change my ways, but only if i really have to. Any opinions? Are my branches annoying?
Aspects: - backup of my ongoing work. (daily) - offering preliminary work to customers for manual build. (weekly) - seeing what others are up to. (rare but happens) - limiting branch clutter. (all the time for everyone)
thanks! ~N
Hi Neels,
On 5/4/23 18:06, Neels Hofmeyr wrote:
Should I change the way I do private branches in osmocom?
I push a lot of private branches everywhere. I was asked in PM if I could cut down on branches a bit because it clutters other developers' view of the git history.
I was that one. My intent was not to blame or suggest you should be using less branches. My aim was to simply ask you if some of those branches were really not used and could be cleaned up by you, since I was heavily looking at libosmocore.git trying to figure out WIP branches for osmo_io/uring at that time.
I'm totally fine with you having branches there. I simply from time to time find out that there's lots of branches in some git repo which I'm inspecting and which can probably be removed since they are not used or have already been merged. As an act of politeness I simply ask the author if they can remove them if I feel like some may be already done, since I tend not to touch others' branches.
I take the chance since I'm already here, to kindly remind people to clean up branches which contain already merged content, etc. I'm the first one who sometimes forget about my branches and I leave them there, but I try to get rid of them often when I go back to that repo and see them.
My immediate response was: the other developer should simply not fetch my branches, or invoke tig or gitk in a way that shows only selected branches.
I could do that, but again my intent was not to tell you not to push your branches. I like seeing other branches too to understand the overall status of the git repo. I was simply asking you whether some of those branches were ready to be removed.
But I reflected a bit and would like to ask generally how we want to do it.
For osmocom it apparently is mostly me pushing private branches a lot. What if we all did that...
I'm fine with it as long as they contain modifications which may be of use to others, or temporary during development.
In linux kernel development it seems to be more like each developer has her own public repository to make a mess in.
So, i could make git clones of our main repositories in gitea and keep my private branches there. It seems like maybe i should do that out of common courtesy.
Feel free to create your clone. I find it more convenient to use the same repo in general so that I share view of current development.
But it also adds a bunch of overhead for me, keeping separate repositories synced. Having multiple remotes affects git commandline behavior. I used to have separate fetch/push URLs for a while, but it was annoying in some ways.
Ack, overhead, that's why I wouldn't go for it.
I can change my ways, but only if i really have to. Any opinions? Are my branches annoying?
Again, your branches are not annoying. I simply wanted to know if some of those were not useful anymore and could be removed.
Kind regards, Pau
Thanks for the response!
All right, so far I'm taking from this that I can happily continue to push countless branches in all our main repositories =) But if anyone thinks this needs changing, I'm listening.
~N
On Thu, May 04, 2023 at 06:06:13PM +0200, Neels Hofmeyr wrote:
Should I change the way I do private branches in osmocom?
I don't think so. Also, let's call them "personal branch" or "developer branch" rather than "private". As in fact, they are public, after all...
I push a lot of private branches everywhere. I was asked in PM if I could cut down on branches a bit because it clutters other developers' view of the git history. My immediate response was: the other developer should simply not fetch my branches, or invoke tig or gitk in a way that shows only selected branches.
exactly. you can always not fetch branches or do something like 'git branch -r | grep -v neels' if you don't want to see them.
For osmocom it apparently is mostly me pushing private branches a lot. What if we all did that...
I always push stuff that's WIP as a user branch.
In linux kernel development it seems to be more like each developer has her own public repository to make a mess in.
that's because they don't follow a model where anyone except a single developer is permitted to push to any branch within an entire repo. With gerrit/gitea/... one can have more fine-grained permission models. And one also can have more trust among a smaller group of developers, compared to the LK model where you have thousands of developers.
So, i could make git clones of our main repositories in gitea and keep my private branches there.
Please don't. From my point of view it is critically important that I can see whatever is happening. For example if somebody is on holidays or on sick leave, it's great there is one designated place where all the latest work usually is. At least for those people that regularly push their stuff, which should really be everyone.