[llvm-dev] Git question about revert

James Henderson via llvm-dev llvm-dev at lists.llvm.org
Thu Jan 21 00:11:14 PST 2021


One other thing I find useful when relanding a patch after fixing it is to
include in the new commit message the reason for the breakage/how the new
patch fixes it.

James

On Wed, 20 Jan 2021 at 21:23, Mehdi AMINI via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

>
>
> On Wed, Jan 20, 2021 at 10:39 AM Paul C. Anagnostopoulos via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
>> This morning I pushed a commit that killed the build, so I reverted it
>> and pushed the new commit to fix the build. Then I did another revert to
>> get my changes back so I can work on them some more.
>>
>> Is it legitimate to use that second revert commit, which was never
>> pushed, to do the additional work, changing the title to something
>> reasonable? If not, could you explain what I ought to do?
>>
>
> That works, in general I tend to `git cherry-pick <original commit>`
> instead, because it brings back the original commit description with it :)
> (and possible link to the phabricator revision).
> I'll still edit the message (git commit --amend) to add that this is a
> reland after fixes.
>
> --
> Mehdi
>
>>
>> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210121/dc641842/attachment-0001.html>


More information about the llvm-dev mailing list