我有3台机器:
笔记本电脑、台式机、服务器
我正在使用两个分支:next 和 regroup。重组是原始的,我希望它成为下一个新的。
活动时间线:
1. I finish the last changes to regroup on Desktop and push them to Server
2. I pull from server to laptop
3. On, laptop I checkout next (next happens to be 2 commits ahead of server/next)
// I want to take all the regroup changes and completly overwrite the next changes.
// I think this command will work (i'm not actually sure what it really did)
4. Laptop: git merge -s recursive -X theirs regroup
5. Laptop: git push
6. Oh no, I forgot to test before push. Quick test. Things break.
7. Laptop: git checkout regroup; git reset --hard HEAD. Test. Things still break.
// Ok, I'll just switch to my desktop whichi still works, and get that perfect branch back.
8. Desktop: Test, things still work. git checkout -b reset_final; git push origin reset_final
10. Laptop: git pull; git checkout reset_final. Test. Things still break!? Why!?
所以,现在,我的服务器和笔记本电脑似乎被搞砸了。我的桌面在 regroup 和 regroup_final 下仍然有我想要的分支,但我不知道如何在服务器上将其重置为该分支。
我想做的是让我的桌面重新组合服务器的下一个。我想彻底消除我对服务器所做的愚蠢推送。我很困惑,我可以使用一些帮助。