git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Baumann <peter.baumann@gmail.com>
To: git@vger.kernel.org
Subject: Re: How to create independent branches
Date: Sun, 9 Apr 2006 10:22:48 +0200	[thread overview]
Message-ID: <20060409082248.GB4798@xp.machine.de> (raw)
In-Reply-To: <20060409081105.GA4798@xp.machine.de>

On Sun, Apr 09, 2006 at 10:11:05AM +0200, Peter Baumann wrote:
> On Sat, Apr 08, 2006 at 08:28:58PM +0200, Jakub Narebski wrote:
> > Peter Baumann wrote:
> > 
> > > 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
> > 
> > Wouldn't it be better and more natural to go back to first commit? > 
> 
> If I go back to the first commit, I'll get the following:
> 
> 	first
> 	 / \
> 	/   \
>    master    todo
> 
> That's not what I want, because in the near future I want to merge
> master and todo, but in my case, todo consists of only of one file (lets
> call it file_a), and the master branch has severeal files (file_{a..z}).
> If I go back to first, I have to delete all files file_{b..z}.
> Further file_a from todo and file_a from master are not equal, the share
> just the same name. But in the near future, they will be merged
> together, so they are equal.
> 
> If I go with the above branching, I'll _think_ (I may be wrong, please
> correct me if I am) I get a merge conflict or worse, all my other files
> file_a{b..z} are merged as "deleted", wich is wrong.
> 
> > Or even empty repository state at the beginning, and branch there?
> 
> This isn't possible because the repository already exists and I don't
> know how to go back to the empty repository state. Even 
> 
> 	git-init-db
> 	git branch todo master
> 
> didn't work.
> 
> > Or make separate repository?
> 
> Ok. You got it. In fact, the todo branch alread exists as a seperate
> repository and I'd like to integrate this in my master repository for
> easier handling (diff etc.)
> 
> To import todo as a subproject doesn't seem right, because it's not
> something really independent in the view of the master repo and I'am
> going to merge todo _into_ master in the near future.
> 
> Any further suggestions?
> 

Just in case nobody noticed, that's why I asked for exporting the whole repo
with git-format-patch in the first place, because I'd like to import the 
patches with git-am in the totally independent branch.

Peter

  reply	other threads:[~2006-04-09  8:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-07 18:47 Can't export whole repo as patches Peter Baumann
2006-04-07 19:18 ` Junio C Hamano
2006-04-08 18:02   ` How to create independent branches Peter Baumann
2006-04-08 18:28     ` Jakub Narebski
2006-04-09  8:11       ` Peter Baumann
2006-04-09  8:22         ` Peter Baumann [this message]
2006-04-08 20:49     ` Junio C Hamano
2006-04-08 20:57       ` Petr Baudis
2006-04-08 21:00         ` Junio C Hamano
2006-04-08 22:09         ` Johannes Schindelin
  -- strict thread matches above, loose matches on Subject: below --
2006-04-08 23:15 colin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060409082248.GB4798@xp.machine.de \
    --to=peter.baumann@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).