git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Angelico <rosuav@gmail.com>
To: git@vger.kernel.org
Subject: git bisect/checkout and changes to .gitignore
Date: Fri, 22 Jun 2012 17:51:00 +1000	[thread overview]
Message-ID: <CAPTjJmq4zv6dBR2Z-HfM7CJoxfprSdJEYYELuyBfahw2PkZ4Lw@mail.gmail.com> (raw)

Greetings! I'm not certain if this list or the git-users group is more
appropriate; my apologies if I've picked wrong.

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?

Thanks in advance!

Chris Angelico

             reply	other threads:[~2012-06-22  7:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-22  7:51 Chris Angelico [this message]
2012-06-22 10:31 ` git bisect/checkout and changes to .gitignore Johannes Sixt
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=CAPTjJmq4zv6dBR2Z-HfM7CJoxfprSdJEYYELuyBfahw2PkZ4Lw@mail.gmail.com \
    --to=rosuav@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).