git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: branch rebase and push

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Dec 19, 2006, 12:13 UTC
Message-ID
<Pine.LNX.4.63.0612191311060.19693@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<200612191258.55226.jnareb@gmail.com>
Hi,
On Tue, 19 Dec 2006, Jakub Narebski wrote:
Show 15 quoted lines
> SungHyun Nam wrote:
> 
> > I'm sorry... but could you teach me how I publish the rebased branch?
> > I think Junio does it for 'pu' branch.
> > Is there recommended workflow? I cannot find.
> 
> Either have "Push:+refs/heads/br:refs/heads/br" in your
> .git/remotes/<name> file, or it's equivalent config file
> version, with '+' denoting that this branch sometimes does
> not fast-forward.
> 
> Or use git push with --force option when you had rebased.
> 
> And of course the server you push to has to not have config variable 
> receive.denyNonFastForwards set to true.

If that is the case, there is a work-around, which happens to be also nice to tracking parties:

	$ git pull -s ours <remote> <branch>
	$ git push <remote> <branch>

The disadvantage (which I'd argue is actually an advantage) is that you do not lose history. After all: "those who do not learn from history are doomed to repeat it".

Ciao, Dscho

Previous: Jakub Narebski
Message 4 of 4 in “branch rebase and push”
  1. SungHyun NamDec 19, 2006
  2. Jakub NarebskiDec 19, 2006
  3. Jakub NarebskiDec 19, 2006
  4. Johannes SchindelinDec 19, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.