GitHub Help says:
Do not force push a commit to a pull request. Force push may break pull requests.
However, I've actually seen force-push in several repositories, and I know that force-push has been added since 2018.In other words, if you know what's going to happen, you can use Force Push.
So what does this help mean by banning force push? What exactly happens when a pull request is broken?Does it mean that the commit before the force push is no longer visible?
github
I often make pull requests, but I haven't actually tried them, so it's just speculation.
force push
seems fine if it's just a commit (equivalent to squash), but
If I change the origin of the branch after the pull request (rebase), I think it will break.
Original State
A---B---C master
\
D---E---Ftopic (You)
After modification (compressed commit)
A---B---C master
\
D'topic (You)
After modification (change the origin of the branch)
A---B---C master
\
D'---E'---F'topic (You)
I didn't know what kind of condition it was written to break even after reading the help, but
It may mean that it cannot be linked (consistency) when comments are included in the review.
(The position of the code pointed out does not match the current position)
I've never seen commits disappear or merge.
© 2024 OneMinuteCode. All rights reserved.