From: Johannes Sixt <j.sixt@viscovery.net>
To: Chris Angelico <rosuav@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git bisect/checkout and changes to .gitignore
Date: Fri, 22 Jun 2012 12:31:31 +0200 [thread overview]
Message-ID: <4FE44983.30209@viscovery.net> (raw)
In-Reply-To: <CAPTjJmq4zv6dBR2Z-HfM7CJoxfprSdJEYYELuyBfahw2PkZ4Lw@mail.gmail.com>
Am 6/22/2012 9:51, schrieb Chris Angelico:
> At my workplace we use git to manage all of our source code. Every now
> and then, we decide that some particular file oughtn't to be
> git-managed, and add it into .gitignore and remove it from the
> repository (for instance, configuration files that become
> per-developer).
>
> Is there a way to checkout an old version of the repository (before
> the file was added to .gitignore), then return to the current state,
> without destroying these sorts of files? Currently, checking out the
> old version quietly "takes control" of the file, and then checking out
> a newer one deletes it.
>
> I've read through the man pages for 'git checkout' and 'gitignore' and
> searched the one for 'git config' (it's a little large to read all
> of), without seeing an option to preserve files on checkout. Is there
> a way to do this, and if so, where can I find it?
Files mentioned in .gitignore are considered garbage. But your file is
precious, hence, you should not list it in .gitignore.
Here is a thread that is worthwhile to read. I posted a patch
http://thread.gmane.org/gmane.comp.version-control.git/185724/focus=185733
but it was dismissed, see
http://thread.gmane.org/gmane.comp.version-control.git/185724/focus=185746
-- Hannes
next prev parent reply other threads:[~2012-06-22 10:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-22 7:51 git bisect/checkout and changes to .gitignore Chris Angelico
2012-06-22 10:31 ` Johannes Sixt [this message]
2012-06-22 12:07 ` Chris Angelico
2012-06-22 17:42 ` Junio C Hamano
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=4FE44983.30209@viscovery.net \
--to=j.sixt@viscovery.net \
--cc=git@vger.kernel.org \
--cc=rosuav@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.