{"thread":{"id":"43360","subject":"Re: branch rebase and push","startedAt":"2006-12-19T03:39:40Z","lastAt":"2006-12-19T12:13:45Z","messageCount":4,"participants":["Jakub Narebski","Johannes Schindelin","SungHyun Nam"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"295267","messageId":"45875EFC.5090408@gmail.com","threadId":"43360","inReplyTo":null,"subject":"branch rebase and push","fromName":"SungHyun Nam","fromEmail":"goweol@gmail.com","sentAt":"2006-12-19T03:39:40Z","receivedAt":"2006-12-19T03:39:40Z","isPatch":false,"sender":{"key":"goweol@gmail.com","avatar":null},"body":"Hello,\n\nCan I push a branch after rebase?\nI got a error message:\n   error: remote 'refs/heads/br' is not a strict subset of local ref\n   'refs/heads/br'. maybe you are not up-to-date and need to pull first?\n\nIt worked fine if I did:\n  $ git checkout -b br\n  $ git pull . master\n  $ git checkout master\n  $ git pull\n  $ git push\n\nBut I got above error message if I did:\n  $ git checkout br\n  $ git rebase master\n  $ git checkout master\n  $ git pull\n  $ git push\n\nThanks.\nnamsh\n\n\n\n"},{"id":"298492","messageId":"em8cti$nff$1@sea.gmane.org","threadId":"43360","inReplyTo":"45875EFC.5090408@gmail.com","subject":"Re: branch rebase and push","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-12-19T09:57:35Z","receivedAt":"2006-12-19T09:57:35Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"SungHyun Nam wrote:\n\n> Can I push a branch after rebase?\n> I got a error message:\n>    error: remote 'refs/heads/br' is not a strict subset of local ref\n>    'refs/heads/br'. maybe you are not up-to-date and need to pull first?\n> \n> It worked fine if I did:\n>   $ git checkout -b br\n>   $ git pull . master\n>   $ git checkout master\n>   $ git pull\n>   $ git push\n> \n> But I got above error message if I did:\n>   $ git checkout br\n>   $ git rebase master\n>   $ git checkout master\n>   $ git pull\n>   $ git push\n\nThe problem you have is with _push_, not branch, I think.\n\nDoes repository you pull from has rebased branch 'br'? If yes, is it\npulled with + in pull/fetch line? Perhaps (but read documentation first,\nplease) \"git push --force\" is what you want, provided that other side\ndoesn't forbid non fast-forward pushes.\n\nBu you usually don't rebase published branch (don't change history\nof published branch). Equivalently, you don't publish rebased branch\nuntil it is ready (or merged in ;-).\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n\n"},{"id":"294494","messageId":"200612191258.55226.jnareb@gmail.com","threadId":"43360","inReplyTo":"4587BD31.9030804@gmail.com","subject":"Re: branch rebase and push","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-12-19T11:58:53Z","receivedAt":"2006-12-19T11:58:53Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"SungHyun Nam wrote:\n\n> I'm sorry... but could you teach me how I publish the rebased branch?\n> I think Junio does it for 'pu' branch.\n> Is there recommended workflow? I cannot find.\n\nEither have \"Push:+refs/heads/br:refs/heads/br\" in your\n.git/remotes/<name> file, or it's equivalent config file\nversion, with '+' denoting that this branch sometimes does\nnot fast-forward.\n\nOr use git push with --force option when you had rebased.\n\nAnd of course the server you push to has to not have config variable \nreceive.denyNonFastForwards set to true.\n-- \nJakub Narebski\n"},{"id":"295028","messageId":"Pine.LNX.4.63.0612191311060.19693@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"43360","inReplyTo":"200612191258.55226.jnareb@gmail.com","subject":"Re: branch rebase and push","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-12-19T12:13:45Z","receivedAt":"2006-12-19T12:13:45Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 19 Dec 2006, Jakub Narebski wrote:\n\n> SungHyun Nam wrote:\n> \n> > I'm sorry... but could you teach me how I publish the rebased branch?\n> > I think Junio does it for 'pu' branch.\n> > Is there recommended workflow? I cannot find.\n> \n> Either have \"Push:+refs/heads/br:refs/heads/br\" in your\n> .git/remotes/<name> file, or it's equivalent config file\n> version, with '+' denoting that this branch sometimes does\n> not fast-forward.\n> \n> Or use git push with --force option when you had rebased.\n> \n> And of course the server you push to has to not have config variable \n> receive.denyNonFastForwards set to true.\n\nIf that is the case, there is a work-around, which happens to be also nice \nto tracking parties:\n\n\t$ git pull -s ours <remote> <branch>\n\t$ git push <remote> <branch>\n\nThe disadvantage (which I'd argue is actually an advantage) is that you do \nnot lose history. After all: \"those who do not learn from history are \ndoomed to repeat it\".\n\nCiao,\nDscho\n"}]}