Re: [Tails-dev] Question about rebasing on git

Poista viesti

Vastaa
Lähettäjä: intrigeri
Päiväys:  
Vastaanottaja: The Tails public development discussion list
Aihe: Re: [Tails-dev] Question about rebasing on git
Hi,

Romeo Papa wrote (18 Aug 2015 23:26:10 GMT) :
> When working on my own git topic branch, what do I do when rebasing
> patches? Do I create a new topic branch and push the rebased commit to
> it, or do I just write over my original topic branch?


My rule is to never rewrite already published Git history, unless I'm
100% sure that nobody looked at it yet, or unless the reviewer
explicitly asks for it.

> I'll give you a practical example: I have pushed a series of patch on a
> clone of the repo on gitlab. They've been reviewed, and I've been asked
> to rebase them. If I overwrite my original branch, then all the comments
> and reviews referring to the overwritten commits will not point to any
> commits on the repositories. Is that acceptable?


In this case it's OK to rewrite history, because the reviewer has
explicitly asked for it.

Some people push the rewritten branch with a "-squashed" suffix, and
leave the original branch untouched. In doubt, I suggest you do this.

Cheers,
--
intrigeri