Search code examples
gitgithubrebase

Git says `Everything up-to-date` but Github is 61 commits behind master


I'm contributing to a big project on Github, I made 25 commits for this PR but I'm 61 commits behind and I need to rebase the project.

There is a no-merge policy, so I can't merge it, I need to rebase. Everytime I use git pull the output is Everything up-to-date. But not everything is up to date because I don't want to pull out of my fork, I want to get those 61 commits from the main project.


Solution

  • Add the upstream repo as a remote, and pull from that instead. For example:

    $ git remote add upstream git@github.com:user/repo.git
    $ git pull upstream main