I am trying to git push origin master
and getting the error ! [rejected] master -> master (non-fast-forward)
. I understand what the error means. (1)
However, I want to decide whether or not to --force
the update anyway. To do this I need to see and compare the commits my local branch and the target remote branch. How can I see them side by side? I would prefer to use a GUI tool like gitg
, but a readable command-line option will suffice.
(1) It means that my local branch is not a direct descendant of the target remote branch. This is explained in:
- Note about fast-forwards (Git documentation)
- GitHub help
- What does it mean that a Git push can not be fast foward merged? (StackOverflow)
- ...and more besides
git pull
first? IMO that would prevent headaches.