1

Topic: git rebase for a branch and it one command

We on the project have a following organization of branches in a Git-repository: master \- dev \- feature-#### \- task-#### From time to time in a dev-branch we merge feature-branches operation over which we consider completed. By the same principle in feature-branches we merge task-branches. After such merges over remaining branches which are not united yet with parent, we do rebase (mandatory with an option-p) over new changes in a parent branch. It is tiresome enough and  on time if the branch to which it is necessary rebase, has still child branches therefore as for each of them it is necessary to repeat rebase separately, without forgetting any branch. Basically, it is possible to implement such strategy rebase in a semi-automatic mode by means of scripts, but it seems that it will be a bicycle of unchecked quality. Some time ago at me it turned out to write a Python-script installed in a git-directory, but and  I up to the end am not assured of its stability + I do not want to drag it with myself, no less than itself Python. I think, it would be possible even to implement somehow an idea by means of more or less simple script on bash (git-rev-parse, git-rev-list, git-merge-base), and almost in  it to register, but also here it is not assured. For example, what to do if one of child branches it is impossible to unite automatically. Whether there are already ready tools for Git, able to transfer branches together with all their child branches?

2

Re: git rebase for a branch and it one command

Hello, halo, you wrote: H> we on the project have a following organization of branches in a Git-repository: H> H> master H> \- dev H> \- feature-#### H> \- task-#### H> H> From time to time in a dev-branch we merge feature-branches operation over which we consider completed. By the same principle in feature-branches we merge task-branches. After such merges over remaining branches which are not united yet with parent, we do rebase (mandatory with an option-p) over new changes in a parent branch. It is tiresome enough and  on time if the branch to which it is necessary rebase, has still child branches therefore as for each of them it is necessary to repeat rebase separately, without forgetting any branch. And what for generally it, than to you it is better merge in such multibranching conditions?

3

Re: git rebase for a branch and it one command

Hello, halo, you wrote: whether H> There are already ready tools for Git, able to transfer branches together with all their child branches? Google produces many articles on a subject "git rebase child branches" There and ready bash-scripts are

4

Re: git rebase for a branch and it one command

Hello, netch80, you wrote: N> And what for generally it, than to you it is better merge in such multibranching conditions? merge in itself leads to a contamination of the graph of changes. Therefore we left such possibility only for merge of changes in parent branches.

5

Re: git rebase for a branch and it one command

Hello, the Corkcrew, you wrote: Google produces many articles on a subject "git rebase child branches" There and ready bash-scripts are Yes, I somehow lost sight of it, and searched whether on "multiple" instead of "child", whether still somehow. And here bash-scripts earlier precisely did not see, but it is not assured yet that they (for example, git-rebase-all) do it how it is necessary for me + is not assured, how much they well work, if rebase stops because of conflicts and empty changes. I will understand, thanks!

6

Re: git rebase for a branch and it one command