In Git I did a checkout to a previous version of our program because there were some errors in the most recent commit, but I was working with different files and needed a working copy. The errors have been fixed now and I am trying to push my changes. In Netbeans I committed my changes and tried to push them, but then realized that I needed to pull first. I did a pull and I didn't see any merge issues, and then I tried to push again but I keep getting the error: "Push would result in a non fast-forward update." What do I need to do to push my changes?
Asked
Active
Viewed 133 times
1 Answers
1
A force push is usually not the way to go.
You should look at your branch structure/tree and see where you have diverged from where you meant to be. You can run git log --decorate
on both you working branch and you master branch to get a good idea of you structure.
You could also try rebasing your changes on top of you master branch (git pull origin master --rebase
).

Rylander
- 19,449
- 25
- 93
- 144