LINUX.ORG.RU

Git добавить исправление к существующему коммиту

 ,


0

1

Оформил недавно PR https://github.com/void-linux/void-packages/pull/42755
В процессе проверок были выявлены проблемы. Решил их и опять сделал коммиты. После чего контрибьютер abenson написал: «Please squash these into a single commit.»
Безуспешно попытавшись обьединить коммиты в 1, я решил закрыть PR и сделать новый, т.к. с git я только со вчера.

$ git clone git@github.com:onlylunix/void-packages.git
$ git remote add upstream https://github.com/void-linux/void-packages.git
$ git pull
$ git checkout master -b firebird3upd3.0.10-1
Редактирую файлы и делаю commit:
$ git add srcpkgs/firebird3/files/firebird-fix-perm-fdb
$ git add srcpkgs/firebird3/files/firebird.xinetd
# git add ...
$ commit -m "firebird3: update to 3.0.10"
$ git push --set-upstream origin firebird3upd3.0.10-1
В браузере на github-е делаю новый PR https://github.com/void-linux/void-packages/pull/42789
Вижу замечания от контрибьютера abenson и исправляю файл firebird-fix-perm-fdb.
Как мне теперь это новое исправление скоммитить чтобы был всего 1 коммит?
Если опять делать коммит:
$ git add srcpkgs/firebird3/files/firebird-fix-perm-fdb
$ git commit -m "Ololo"
$ git push --set-upstream origin firebird3upd3.0.10-1
, то их будет 2.
И там опять просят: «Please don't open and close PRs as that makes it more difficult for us to track issues and needed changes.

In the future, please make the changes by amending and squashing the existing commits and then force pushing to the same branch.»

★★★★☆

Последнее исправление: superuser (всего исправлений: 2)