All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Cc: Rogan Dawes <lists@dawes.za.net>
Subject: Re: Forcing rewrite of files in working tree
Date: Fri, 3 Aug 2007 14:39:28 +0100	[thread overview]
Message-ID: <200708031439.29721.andyparkins@gmail.com> (raw)
In-Reply-To: <46B3268C.7060707@dawes.za.net>

On Friday 2007 August 03, Rogan Dawes wrote:

> > The only method I've found is to delete the file in the work tree then do
> > git-checkout again.  Even with -f, if the file is not changed git doesn't
> > perform a checkout again, so git-checkout -f is not sufficient.  I assume
> > I can do what I want with some clever plumbing, but I don't know any
> > plumbing. :-)
>
> $ git reset --hard

I think that that suffers the same as "git-checkout -f"; if it doesn't see 
changes then it doesn't reread.  Also, it's not possible to do per-file:

$ git reset --hard HEAD somefile.txt
Cannot do partial --hard reset.

Which is a necessity really; I don't want to accidentally overwrite work 
that's not yet checked in in the rest of the tree.

Is git-checkout-index the thing I'm looking for?  I'm wondering if the "-n" 
switch is the trick?


Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com

  reply	other threads:[~2007-08-03 13:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-03 12:45 Forcing rewrite of files in working tree Andy Parkins
2007-08-03 12:58 ` Rogan Dawes
2007-08-03 13:39   ` Andy Parkins [this message]
2007-08-03 19:55 ` Linus Torvalds

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=200708031439.29721.andyparkins@gmail.com \
    --to=andyparkins@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=lists@dawes.za.net \
    /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.