How is git commit --amend implemented? Why doesn't GitHub support this feature?
滿天的星座
滿天的星座 2017-05-02 09:50:16
0
3
607

Gerrit uses git commit --amend, but GitHub does not support it at all, which feels quite strange.
Which expert knows and can explain it?

滿天的星座
滿天的星座

reply all(3)
phpcn_u1582

Github supports it, but if you need amend已经push过的内容,修改后push时需要加上-f/--forceparameters

https://help.github.com/artic...

阿神

The reason why gerrit adopts this mode is to facilitate viewing and modification. Each amend only forms one push set, and the granularity is small

大家讲道理

Gerrit identifies your patch based on change-Id. For various reasons, the local repository where you originally submitted the code is broken. At this time, you can remove your patch from Gerrit, because you can no longer git commit -a at this time. --amend, you can write your original Change-Id at the bottom of the commit log, or you can submit it to your original change to generate an updated patch.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template