Push to GitHub fork takes no effect, says all commits up to date, but made some changes

StackOverflow https://stackoverflow.com/questions/18840667

سؤال

I forked a GitHub project, modified some code, and used

$ git push origin master

to push the modification to my forked project. After that, in starting a pull request, GitHub said:

There isn't anything to compare. nferraz:master is up to date with all commits from VicoWu:master. Try switching the base for your comparison.

Vico is my name. It seems that my push takes no effect. Why is this happening?

هل كانت مفيدة؟

المحلول

First, never do a pull request from master.

It is a branch also used in the original repo, and it should be kept in sync with upstream/master, upstream being a reference to said original repo.

You should create a dedicated branch for the evolution you want to promote as a pull request, and push that branch to origin (your fork).

Fork in GitHub

See more with this "couple of tips for Pull Requests".


If GitHub doesn't see any difference, it could because you were in a different branch , or even in a DETACHED HEAD when you did your commits.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top