I've got bonobo git server that's supposed to "handle syncing" among at least 2 machines, for now.
It was working fine but lately I've ran into one big problem with it and a related second one with git itself:
I can't simply push from each client into it without getting the faded "non-fast-forward" issue, and though I believe it's an issue with bonobo and bare servers, its creator begs the differ, briefly.
The following is not a copy paste, but it is the command I use when I get the issue and, as far as I recall, the warning should be very similar to this:
git push -u "server" ! [rejected] server/master -> master (non-fast-forward)
Today I also can't even fetch from one client into another without getting the "non-fast-forward" freaking issue. Then I tried pushing from it into the server with the mirror option, which is the only one that works for pushing into the server due to issue #1, and pulling from the server on my machine. For my surprise, that worked! But now trying to fetch or pull from the other machine, the issue persists. My problem here is: why?!
The following is just a copy & paste from Git Extensions:
git fetch --progress "client" Done From \\\CLIENT\project\git ! [rejected] master -> client/master (non-fast-forward)
I've actually fixed this using
git fetch -f "client"
, but I still don't know what happened.
Disclaimer: Now I'm already going to git-scm.com to try and learn in details how the hell git works. Maybe I shouldn't even be trying to "fully sync everything" after all...
--
edit: Besides the obvious "not pulling before" issue, I've found two reasons why this could potentially be happening, but none helped fixing in my case: using rebase
for editing past commits which are already replicated elsewhere or having same branches under different names, which must happen for the master
at very least. This later one makes a lot of sense, except that it works some times and, after some pushes it stops working. Plus, on the fetch side, using fetch -f
, it didn't broke any branches. So that wasn't it.