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

How to create independent branches

From
PBPeter Baumann <peter.baumann@gmail.com>
Date
Apr 8, 2006, 18:02 UTC
Message-ID
<20060408180244.GA4807@xp.machine.de>
In-Reply-To
<7vr749i48s.fsf@assigned-by-dhcp.cox.net>
On Fri, Apr 07, 2006 at 12:18:27PM -0700, Junio C Hamano wrote:
Show 20 quoted lines
> Peter Baumann <peter.baumann@gmail.com> writes:
> 
> > How can I get the inital commit as a patch?
> 
> format-patch is designed to get a patch to send to upstream, and
> does not handle the root commit.  In your two revisions
> repository, you could do something like this:
> 
> 	$ git diff-tree -p --root master~1
> 
> Or more in general:
> 
> 	$ git rev-list master |
>           git diff-tree --stdin --root --pretty=fuller -p
> 
> BTW, I've been meaning to add --pretty=patch to give
> format-patch compatible output to diff-tree, but haven't got
> around to actually do it.  Another thing I've been meaning to do
> is "git log --diff" which is more or less "git whatchanged".
> 
Ok. That did it.

Another question. I'd like to create a totaly independent branch (like the "todo" branch in git). Is there a more user friendly way than doing

git-checkout -b todo rm .git/refs/heads/todo rm .git/index rm <all_files_in_your_workdir>

... hack hack hack ... git-commit -a

I looked all over the docs, but can't find anything obvious.
-Peter
Previous: Junio C HamanoNext: Jakub Narebski
Message 3 of 10 in “Can't export whole repo as patches”
  1. Peter BaumannApr 7, 2006
  2. Junio C HamanoApr 7, 2006
  3. How to create independent branchesPeter Baumann, Apr 8, 2006
  4. Jakub NarebskiApr 8, 2006
  5. Peter BaumannApr 9, 2006
  6. Peter BaumannApr 9, 2006
  7. Junio C HamanoApr 8, 2006
  8. Petr BaudisApr 8, 2006
  9. Junio C HamanoApr 8, 2006
  10. Johannes SchindelinApr 8, 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.