Search code examples
gitconflictpull-request

Git pull request conflict


I am very new to git and I am worried my codes are going to ruin the master project.

1 - I forked a new repo from master project into my account. And I changed some codes and did pull request to master in last week.

2 - Again, this week, I did the same. I changed some codes and did pull request to master project but it has a conflict with a master project.

The owner of master project said that "someone has changed in the master project and you need to accept it". But I have no idea how to accept it.

I tried these commands

git pull // This returns Already up-to-date.
git checkout master // This returns Already on 'master'.
git merge origin/master // This returns Already up-to-date.
git status // This returns nothing to commit, working tree clean.

See the working tree example


Solution

  • As far as I understand, it seems like you would like to pull in changes from the master repository into your repository (or vice versa).

    Either way, in GitHub, you can either create a pull request to pull in changes from the head fork into your personal clone or you can configure an upstream remote to fetch changes from in your local copy. There you would merge in changes from the master repository and push these back to your fork on GitHub.

    See also https://help.github.com/articles/syncing-a-fork/ as a reference.

    If you simply need to accept a pull request, just browse to the master repository (assuming you are someone who has write access) and check the pending pull requests.