First question so I'm going to try to get this correct.
I created a branch and was working on a project for a couple of weeks. I created a pull request to merge my branch with the master branch. When my branch was merged with master it created a lot of various issues (whoops lots of emails in the morning). So, my pull request was reverted and the next day I corrected the issues and pushed back to my branch. However, when attempting to create the pull request, it does not recognize the changes prior to the revert.
I've attempted 'git checkout (sha for previous commit)' and then 'git checkout -b (new branch)'. That did not work. I attempted to use cherry pick, but I'm not confident I did that correctly.
Any suggestions would be greatly appreciated!
Simple Answer, you have two options here:
First, stash your new changes, then either
Option 1 - Create a new branch, and cherry-pick all your changes from your old branch, search on how can you cherry-pick a range of commits.
OR
Option 2 - If you don't want to create a new branch, you will first need to pull in the latest changes from the mainline (including your reverted commit). Then essentially revert your reverted commit in your branch.
Then, stash pop your changes, and commit. Now your pull request will reflect all your changes.
Essentially, the pull request, gets all the commits when you had last separated from mainline.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With