I know this question has been asked an answered many times, but I'm running into a weird issue that I haven't been able to find the answer to online.
I've created a branch and decided to open a PR. The problem is that Bitbucket is complaining that there are conflicts and that I need to manually resolve them first.
So I ran git pull origin develop
in my current feature branch. I started manually resolving conflicts, but then I realized that some of the code that I wrote is gone. A simple example is I made changes to a function, so that the function takes an argument. But after running git pull origin develop
, the function call stayed the same, (i.e somefunction(someParameter)
), but the function definition went back to export const someFunction()
instead of export const someFunction(someParameter)
.
I've also tried running git pull -s recursive -X ours origin develop
, but that didn't fix the issue.
What am I doing wrong here? I want all the code on my feature branch to be the code that develop should have. Is it possible to completely override any changes on develop during a git pull origin develop
?
I should probably also mention, that changes to develop can only be made with PRs, so I can't force push to it.
My only temporary solution is to copy all the contents of my directory (on my feature branch) over to a temporary directory, then checkout to develop, then checkout into a new branch and then delete the content in the directory and paste into it the content from the temporary directory. Obviously, I'd like to know if another way is possible, but I guess I'll do this for now.