[Development] gerrit : using branches (was: pointers to use it cleverly/efficiently?)

Konstantin Tokarev annulen at yandex.ru
Mon Apr 4 12:03:53 CEST 2016



04.04.2016, 12:32, "René J. V. Bertin" <rjvbertin at gmail.com>:
> Welbourne Edward wrote:
>
> Hi,
>
>>>  What works well for me e.g. before doing a commit is what I think of
>>>  as manual rebasing: I remove my patches one way or another, git-pull,
>>>  and then reapply the patch(es).
>>
>>  That's pretty much exactly what
>>
>>  $ git pull -r
>>
>>  (a.k.a. --rebase) will do for you, automagically. It might not play
>>  ideally with merges in all cases, but I'm guessing you don't have a
>>  surfeit of those.
>
> Actually, it only does that after you committed your changes.
>
> More often than not I don't because I need to be able to maintain patchfiles that
> apply against head or else a known commit (e.g. one that corresponds to a
> release). And I prefer to do that without having to remember to specify the 2
> commit hashes to be compared explicitly.

In git you should use commits in branch instead of patchfiles.

If you need to produce actual patch files, you can always extract them with git format-patch.

>
> Now I suppose I could maintain and commit my changes in a personal topic branch
> if
> - one can sync such a branch w.r.t. (rebase on) a specific commit from the
> original branch (i.e. not just against head)
> - if there's a convenience command to obtain a complete diff of the topic
> branch's head against the current state of some other branch.
>
> Apologies if I missed those from your earlier replies.
>
> With "complete diff" I mean something like `git diff --no-ext-diff head -- .`
> though it may be that I only need those extra options to get newly added (but
> not committed) or deleted files included in the diff.
>
> Thanks,
> R.
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development

-- 
Regards,
Konstantin



More information about the Development mailing list