Thread (2 messages) flat view 2 messages, 2 authors, 2016-08-11

Re: branch rebase and push

From: Jakub Narebski <hidden>
Date: 2016-08-11 20:42:48

SungHyun Nam wrote:
Can I push a branch after rebase?
I got a error message:
   error: remote 'refs/heads/br' is not a strict subset of local ref
   'refs/heads/br'. maybe you are not up-to-date and need to pull first?

It worked fine if I did:
  $ git checkout -b br
  $ git pull . master
  $ git checkout master
  $ git pull
  $ git push

But I got above error message if I did:
  $ git checkout br
  $ git rebase master
  $ git checkout master
  $ git pull
  $ git push
The problem you have is with _push_, not branch, I think.

Does repository you pull from has rebased branch 'br'? If yes, is it
pulled with + in pull/fetch line? Perhaps (but read documentation first,
please) "git push --force" is what you want, provided that other side
doesn't forbid non fast-forward pushes.

Bu you usually don't rebase published branch (don't change history
of published branch). Equivalently, you don't publish rebased branch
until it is ready (or merged in ;-).

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help