Skip to content

Instantly share code, notes, and snippets.

@gene1wood
Last active March 1, 2023 01:10
Show Gist options
  • Save gene1wood/4b46700dda535b3d509d46e8326de15d to your computer and use it in GitHub Desktop.
Save gene1wood/4b46700dda535b3d509d46e8326de15d to your computer and use it in GitHub Desktop.
What to do when you git commit before pulling and then find out when you push that your commit is not based off of the right HEAD

First STOP, don't do a git pull

If you git push, find the problem, then do a git pull, you're in no man's land

If you've been able to resist the urge to git pull, then merely do a

git pull --rebase which will fix this

http://stackoverflow.com/a/4675513/168874

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment