atom-community / atom

:atom: Community build of the hackable text editor
https://atom-community.github.io/
MIT License
734 stars 30 forks source link

I merged from upstream accidentally #353

Closed icecream17 closed 2 years ago

icecream17 commented 2 years ago

Ok, this just happened, here's the explanation.

I wanted to look at the differences between this and atom...master, so I clicked the top right button (wrong) and then my hand moved automatically to the green (!!): image

I was stunned. I asked around, saw that my upstream pr had been merged, and then found the revert pr button. However, that didn't solve the problem, because the commits were still there, so github now thought that atom-community was up-to-date with upstream even though it wasn't.

After getting help from the python, programming, and ts discord servers, someone eventually suggested git reset HEAD^^, which led to the actual undo and force push, and now the repo is the same as before except for the closed prs and this issue.


Thoughts AAAA *so sorry about this (and also all the notifications that must be happening)* Possible future preventative measures: edit: Ultimately, be more careful. There are preventative measures, like using another branch or typing out `/compare` in the url, but after weighing the choices it seems like the only measure is adequacy and growth. Also after this was fixed, someone recommended to use git revert (same as the undo pr, but) in spirit that means waiting until reverting with that force-push. E.g.: Having atom-community comment or force-push themselves, after communication about what happened and the specific fix. In this case, the github desktop display showed aminya's fetch upstream, which matched what I suspected was the actual last commit, and in a sigh of relief and more sanity checks (the value of local development), I force pushed. Objectively, waiting for the community to review any potential actions would've been safer... not extremely, but there's an option.

In the end, this didn't affect anything, But wow.


Historial notes Can't rebase last n commits, merge pr commit chronologically is interspersed with non-pr commits In addition, when I merged that pr, it seems like a bunch of atom prs were created to match: ![image](https://user-images.githubusercontent.com/58114641/155656620-d8e21471-545a-4904-81f0-ac9527121c2d.png) I think this because I'm pretty sure the actual last pr was aminya's upstream This implies (as said above) that the latest non-pr commit happens After the first pr commit: 5 yrs ago ![image](https://user-images.githubusercontent.com/58114641/155658067-f40e7c72-2eee-4d5b-925f-f42b6bcf9e70.png) https://github.com/atom-community/atom/pull/309 was on aug 16, 2021 and is definitely non-pr
icecream17 commented 2 years ago

Fixed by undoing the undo merge and the accidental merge then force push

git reset HEAD^^
git reset HEAD^^
git push -f

Credits to the programming, python, and ts discord servers (final suggestion by Josh-Cena in the ts discord)