Ok, I’m not really git fan. Actually, I don’t like at all… But I have to use because of some projects and now, that GNOME is moving to Git, more.
Anyway, I use it. But there are some workflows I don’t get well yet. I know the basis and maybe a bit more, but I’m far from a git-poweruser.
There are some docs and interesting threads about git in GNOME, but I have to learn a lot…
The thing is I like to collaborate with some project in which official git repos I haven’t account, so I try to use Github to public and manage my branches.
Although I don’t like git so much, I do like Github. It is a very good web gui for a DCVS and has awesome features…
But here is one of my use cases:
I try to make some changes on a Debian project (live-helper) which uses a git repository. But I work with a friend on some features and changes over the main project.
My first though was: I create a mirror of the upstream project on Guthub, my friend create a “fork” (kind of “git clone” but keeping parent-child relationship on Github) and then he can make so many branches he need and develop the different features and changes.
I like to have one branch where merge all the mature features, but also keeping the upstream mirror. So I create a branch of my mirror and I’m merging there the different features.
I think until here everything is right. If there is a better way, tell me, please.
Keep going… The problem is not all the features are interesting for the upstream projects, so the merged branch is not good place for get patches or merge from. But it is our good branch which we use for our project, so we need keep as is.
But some of our features are integrated in upstream. Which is good and thing we want. The problem is we we pull the changes from upstream, there are some changes identical, but merged or committed in other order. Some times pull a changed we push to upstream make some mess in our history…
And if we like to keep updated the different feature branches from upstream to keep working on this features but with valid and new code, from where we pull those changes?
From our mirror? the merged branch? is there another magic git way?
I know this could be very confusing. I think it’s easy to explain with graphics but my artistic skills are below zero…
But this graph could help (or not…)
I hope some git guru understand some of this uses case and give me some tips to doing better.
BTW, I couldn’t find a way to make more than one fork from one branch on Github, which would have been useful…
NOTE: I have my reasons to dislike git, but it’s now the point of this post. I don’t like flames and I don’t like argue about which DCVS is better, I just like to know how to use better this tool. Thanks 🙂