I was following https://wiki.php.net/vcs/gitworkflow to make my first
commit to ext/pdo_dblib. I made a little mistake. I committed first to
PHP-7.0. I forgot about the PHP-7.1 branch and merged from PHP-7.0 to
master. I went back and merged from PHP-7.0 to PHP-7.1. All merges applied
cleanly, but will this cause git history issues? Figured it would be better
to check what to do next than to do any preemptive cleanup.
Thanks,
Adam
Hi!
I was following https://wiki.php.net/vcs/gitworkflow to make my first
commit to ext/pdo_dblib. I made a little mistake. I committed first to
PHP-7.0. I forgot about the PHP-7.1 branch and merged from PHP-7.0 to
master. I went back and merged from PHP-7.0 to PHP-7.1. All merges applied
cleanly, but will this cause git history issues? Figured it would be better
to check what to do next than to do any preemptive cleanup.
As long as you merge up (7.0->7.1, 7.1->master) it's fine. Correct order
is 7.0->7.1->master but if you did 7.0->master once it's no big deal.
Main thing is to never merge down (master->7.0), that would mess up a
lot of things.
Stas Malyshev
smalyshev@gmail.com
Adam,
-----Original Message-----
From: Adam Baratz [mailto:adambaratz@php.net]
Sent: Monday, September 12, 2016 11:54 PM
To: internals@lists.php.net
Subject: [PHP-DEV] merged branches in incorrect orderI was following https://wiki.php.net/vcs/gitworkflow to make my first commit
to ext/pdo_dblib. I made a little mistake. I committed first to PHP-7.0. I forgot
about the PHP-7.1 branch and merged from PHP-7.0 to master. I went back and
merged from PHP-7.0 to PHP-7.1. All merges applied cleanly, but will this cause
git history issues? Figured it would be better to check what to do next than to do
any preemptive cleanup.
To keep it clean, you can
git checkout master
git reset --hard origin/master
and same for every branch containing a wrong merge. This will reset every branch to the state of remote, after that you can repeat the merge clean way.
Regards
Anatol
To keep it clean, you can
git checkout master
git reset --hard origin/masterand same for every branch containing a wrong merge. This will reset every
branch to the state of remote, after that you can repeat the merge clean
way.
Yes, but in this case, I'd already pushed.