How to create independent branches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 07, 2006 at 12:18:27PM -0700, Junio C Hamano wrote:
> Peter Baumann <peter.baumann@xxxxxxxxx> 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
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]