-1

I've been working on a PR for a long time (over a year). Initially, I had created a fork of the repo I was contributing to, created a new branch to fix the issue I was going to work on, created the patch and pushed it to my fork, and opened a PR on the original repository (the standard workflow for contributing to someone else's repo).

After some code review, there were some suggestions made on the PR which I accepted and committed using GitHub's web interface. Now when I run git pull I get a lot of merge conflicts, and if I fix those conflicts and push my new changes to the PR, all of the commits that were merged to the repo's main branch since my PR was made are also included in my PR for some reason?

I was asked by the maintainers to rebase my branch, which I did, and it worked once, but now this problem has occurred again. It has gotten too complicated for me to understand exactly what is going on with all the involved branches now.

Is there any way for me to tell git to ignore whatever the state of my local branch is right now and just set the state of the local branch (i.e. the content of my files locally) as whatever is on the GitHub PR branch right now?

1

1 Answer 1

0

If it's not something major, you can try using git reset to revert to a suitable commit before the conflicts, and then use git pull to fetch all the changes. This should resolve all your conflicts.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.