Pregunta

Here's the sequence

I have no edits on the branch at this point

  1. I did a git pull --rebase in a branch that is tracked to a remote branch
  2. Conflicts occured
  3. I did git reset --hard
  4. then git rebase --abort

And now it says that my branch is ahead by X commits

I tried doing git reset --hard again then git fetch then git fetch origin then git checkout the branch again all to no avail

how do I solve this problem?

¿Fue útil?

Solución

The fact that you are X commits ahead is a consequence of the implied git fetch that was done during your initial git pull (you also did an explicit git fetch afterwards). It just means that these commits aren't pushed to the tracked branch yet. That's not a problem at all. This message will disappear once those commits are pushed.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top