Weird behaviour
CodeWithShreyans opened this issue · comments
This weird thing happened in a repo I had forked and made a commit to on my fork, nothing else.
simple-icons/simple-icons#10353
Hello, @DestroyerXyz this is working as expected, please see the warning message while installing the app. It's also explained in detail here: https://github.com/wei/pull?tab=readme-ov-file#basic-setup
Tl;dr. Pull bot automatically keeps forks's default branch in sync with upstream's default branch. In the case of simple-icons, it is the develop
branch.
Suggestion: A good practice with Git & GitHub is to create feature branches for each feature you work on and make PRs from that, instead of working directly on the default branch.
But shouldn't it only do so if it can by fast-forwarding?
Please review the readme link above. For the default branch, hard reset is used. This is a feature requested by most users as sometimes upstream changes commit history and causes forks' default branch to go out of sync.
It shouldn't, though, be undoing commits that have been made to the default branch of the fork, that's the source of the issue here. It caused GitHub to automatically merge a PR and trigger related actions, which is extremely undesirable, and potentially damaging, behaviour.