A few days ago a team member tried a git revert on a git repo on our server. Since then, changes have been pushed to and pulled from the repo, and I'm wondering how to resolve the message I get when running git status
On branch master
Your branch is up-to-date with 'origin/master'.
You are currently reverting commit 1324625.
(all conflicts fixed: run "git revert --continue")
(use "git revert --abort" to cancel the revert operation)
nothing to commit, working tree clean
Basically, the way everything is working right now is how it should be, and I don't want to choose one of these options and mess it up.
So, what should I do?
In general, to decide how to proceed from here one would need to understand the goal state.
Why was the revert attempted? Why was it never completed? Is it still desired to undo those changes? Or have other changes made it unnecessary/undesired? Or was it a mistake in the first place? Or...?
If you know that the last committed state is what you want, then you'll end up wanting to --abort
.
If you know that your local working copy is what you want, then you probably want to '--continue' (because the revert changes are likely in the index and working tree).
If you need to see what the difference would be, use git status
; the revert changes should show as staged.
If you really can't tell what's the right outcome, the "safer" option is to --continue
; this will create one or more new commits. Before pushing you can test the state with the new commits, then if it turns out you don't want them you can back them out (with git reset --hard
).