Re: Problems switching branches
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Nov 4, 2010, 14:39 UTC
- Message-ID
- <AANLkTikK93Jt+dAkpp6K-hQEo6D67q5OKJSLs+g0YL4y@mail.gmail.com>
- In-Reply-To
- <loom.20101104T012032-963@post.gmane.org>
On Thu, Nov 4, 2010 at 7:23 AM, Maaartin <grajcar1@seznam.cz> wrote:
Show 17 quoted lines
> Maaartin <grajcar1 <at> seznam.cz> writes: > >> >> I sometimes run in a problem similar to >> http://kerneltrap.org/mailarchive/git/2008/10/15/3667644/thread >> There are some ignored files which I want neither track nor throw away; I'm > just >> happy to have them and keep them out of version control. >> >> Unfortunately, there weren't ignored in the old branch. I'd be quite happy > with >> non-destructive switching like "checkout everything what doesn't overwrite an >> untracked file", so I would end in the old branch with a dirty working tree. > Is >> it possible? > > No answer?
Which means nobody is interested in. Well, not really.
I also get irritated by a similar situation, where the untracked files have the same content as the to-be-checked-out files. I have been tempted (but never got around) to make git compare the in-index content and the untracked file, if it's the same, no need to abort the checkout process.
But your approach may be better. Yes, I think it's possible. Any suggestion for checkout's new argument? --no-overwrite-untracked seems too long.
-- Duy