I merged the Main branch into my feature branch, but in doing so, I ended up deleting a portion of the files that ran the feature. I reverted the changes so the feature was not lost. Now, I believe rebasing is what I wanted to do initially, though when I attempt to rebase the feature branch with the updated main branch, I am notified there are no commits to be rebased, even though some of the files in main are more up to date with the changes I want, than the feature branch. I need to bring the updated files in main over to my feature branch but I am unsure what I should do. I am working with Git.
Asked
Active
Viewed 27 times
1 Answers
0
You will perhaps have a simpler time using git cherry-pick <range of commits>
:
in the history of your repository :
git log --oneline --graph main feature # or use a graphical viewer
spot the hash of the commit where
feature
forked frommain
(let's call this commitfork
)from your
main
branch, run :git cherry-pick fork..feature

LeGEC
- 46,477
- 5
- 57
- 104