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

Re: git diffs

From
Linus Torvalds <torvalds@osdl.org>
Date
Aug 1, 2005, 15:51 UTC
Message-ID
<Pine.LNX.4.58.0508010849390.14342@g5.osdl.org>
In-Reply-To
<pan.2005.08.01.07.55.40.43904@smurf.noris.de>
On Mon, 1 Aug 2005, Matthias Urlichs wrote:
Show 14 quoted lines
>
> Hi, Linus Torvalds wrote:
> 
> > 	git checkout -f master
> > 	git-rev-parse master > .git/refs/heads/merge-branch
> > 
> > 	#
> > 	# Switch to it, always leaving "master" untouched
> > 	#
> > 	git checkout -f merge-branch
> 
> Isn't that equivalent to (but slower than)
> 
>     git checkout -f -b merge-branch master
No.

If you had a previous merge-branch (because something went wrong last time, and you just re-start the whole thing), you really want to _first_ force the branch to "master", and then create the new merge-branch.

Also, the last "git checkout -f merge-branch" will be pretty much zero time, because the stuff is already at the right point, so it will basically end up just re-doing the symlink.

So I did it that strange way for a reason.
		Linus
Previous: Matthias Urlichs
Message 3 of 3 in “Re: git diffs”
  1. Linus TorvaldsAug 1, 2005
  2. Matthias UrlichsAug 1, 2005
  3. Linus TorvaldsAug 1, 2005

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.