1

I rebased my m-branch atop of master

Now I want to sync my remote m-branch with my local m-branch

I know i should do git push -f

but i get an error:

➜  SupporTool git:(m-branch) git push -f origin m-branch
Counting objects: 745, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (638/638), done.
Writing objects: 100% (745/745), 131.03 KiB | 0 bytes/s, done.
Total 745 (delta 399), reused 0 (delta 0)
To sso://dev-internal/SupporTool99)
remote: Resolving deltas: 100% (399/399)           : Resolving deltas:  98% (392/399)
non-fast-forward)ing changes:
remote: Processing changes: done
error: failed to push some refs to 'sso://dev-internal/SupporTool'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
UmAnusorn
  • 10,420
  • 10
  • 72
  • 100
Elad Benda
  • 35,076
  • 87
  • 265
  • 471

1 Answers1

1

It's hard to see very well but your remote: Resolving deltas: and some other remote:-prefixed message are being overwritten by other error messages. This may involve much of the problem. It looks like the other Git involved in your git push action is running extra code from a hook, and that extra code is doing something else. It's possible that this "something else" is what is truly failing.

In any case, force-push is still a request, and the other Git involved in the force-push is free to reject this request. This is in fact happening: the other end is rejecting the request, for whatever reason, and requesting that it be a more forceful push is not overriding the rejection. You will need to consult with whoever operates that other Git to find out why. If there were nothing special happening in the other (remote) Git, the force request would override the default rejection, so this failure-to-override is due to some setting or action on the remote.

torek
  • 448,244
  • 59
  • 642
  • 775
  • tried to simplify the name, but forgot to change in error. fixed my question – Elad Benda Nov 03 '16 at 09:58
  • OK, I'll edit away the first paragraph. The rest still stands: you need to find out what the remote is doing and why they have chosen not to accept force-push, and what it takes to get them to allow force-push (well, that, or give up on pushing rebases). – torek Nov 03 '16 at 10:04