How to fix "Repository is X commits ahead of [origin]" #195692
Replies: 2 comments 1 reply
-
|
This is not an error — it simply means your fork contains 7 commits that are not in the original repository yet. When you fork a repository on GitHub If your goal is to contribute those fixes, the next step is to open a Pull Request from your fork to the original repository. Once the repository owner reviews and merges your Pull Request, your fork and the original repository will be in sync again, and the “ahead” message will disappear. If you do not want to keep those 7 commits, you can discard them and reset your fork to match the original repository. On GitHub To prevent confusion in the future, it helps to remember that “ahead” is not a problem to fix. It simply indicates that your fork contains commits that have not yet been merged upstream. This is the normal state whenever you make changes in your own fork. So in your case, if those 7 commits are the fixes you intended to contribute, everything is working as expected and you should create a Pull Request rather than trying to remove the message. |
Beta Was this translation helpful? Give feedback.
-
@dohyeon5626 It is not offering me that option. |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Question
Body
Hello Github,
I'd like to preface this with the following:
I've got one repository that I forked off of someone to help with fixing some small issues. I'm not great at code, but I'd recognized some oversights that I offered to fix and I did. I have, however, absolutely no idea how Github works. The forked Repo now says that I'm 7 commits ahead of the repo I forked it off of. I'd like that error not to be there, but I can't find a way to sync my fork with the original fork again so that it's not ahead anymore. I've looked around and saw some tutorials that mention rebasing, but because my fork is not behind it's now allowing me to do that.
I'd very much like to not have to delete and re-fork the repo if I can since that removes contributor attributions. Can anyone please tell me what I can do to fix it and prevent it in the future? When explaining, assume I know absolutely nothing about this, because I don't.
Beta Was this translation helpful? Give feedback.
All reactions