I am encountering challenges in resolving conflicts in my React Native project using GitHub Desktop and VSCode. I worked in a branch fonts-and-colors that is forked from main. I was going to commit all new changes in my code to GitHub, but instead of commiting to fonts-and-colors branch I merged old commits in pull request into main from fonts-and-colors and created a new branch (home-screen) to commit the latest local changes. But encountered conflicts.
Right after the action above I saw the changes in my project code in VSCode.
I have tried using "Accept Current Change," "Accept Incoming Change," and "Accept Both Changes," to restore the code but none seem to incorporate my saved modifications. When selecting these options, the code incorporates some new changes but excludes some older modifications.
I want to get back my last saved version of the code.
Is there a step-by-step guide or specific approach I can follow to manually resolve these conflicts and ensure that my changes are preserved?
I appreciate any guidance or assistance. Thank you!
Following is how to have a clean version locally, and only once you are satisfied with the results push to the master again.
fonts-and-colorsbranch, usinggit loggit checkout -b fonts-and-colors-rescued <commit-hash>git checkout maingit revert OLDER_COMMIT^..NEWER_COMMITNote: you could instead move the main to point to the previous commit and force push, which I do not recommend