Skip to content

Syncing a fork leaves me one commit ahead of upstream/master #22440

Discussion options

You must be logged in to vote

Thanks for the answer. This helped me resolve the issue the first time it occurred for me.

I recently pushed some changes to an upstream repo and the changes got merged into that repo. But after it was merged, my fork was showing ‘1 commit ahead of [upstream], 1 commit behind [upstream]’, even though virtually everything was same between my fork and the upstream repo. So I followed the same solution thinking it would resolve this, and then it became ‘1 commit behind [upstream]’. It basically removed my own commits from my fork. So now, I did a fetch upstream before doing the reset again, and it shows the status correctly now.

So, I think it would be safe to add fetch before reset like below…

Replies: 8 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@eddiestefanescu
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
9 participants