git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Some advanced index playing
@ 2006-12-03 17:01 Alan Chandler
  2006-12-03 18:24 ` Linus Torvalds
                   ` (2 more replies)
  0 siblings, 3 replies; 47+ messages in thread
From: Alan Chandler @ 2006-12-03 17:01 UTC (permalink / raw)
  To: git

With all the discussion about the index file in the last few days I would have 
thought that this issue would have come up.  But I don't think it has.

I have been editing a set of files to make a commit, and after editing each 
one had done a git update-index.

At this point I am just about to commit when I realise that one of the files 
has changes in it that really ought to be a separate commit. 

So effectively, I want to do one of three things

a) git-commit <that-file>

Except I can't because there is a safety valve that prevents this and there is 
no force option.

b) Revert the index entry for that file back to the previous HEAD commit 
point, whilst leaving the edits in the working tree, so that I can then 
commit without that one file.

I can't find a command to do that.  The nearest seems to be 
git-update-index --remove, but the manual says that it will not do anything 
if the file still exists.

c) Revert the entire index back to the state it was at the last commit so I 
can selectively add back in the files that I have editted.

The command to do that seems to be

git-read-tree HEAD 

I tried this, and it did indeed seem to exactly this - not quite what I 
wanted, but actually a reasonable compromise.

However, it took me a long time scanning possible commands before I found it 
so I thought I might add some text to one of the tutorials

Any ideas of where?

What happened to the text written here

http://marc.theaimsgroup.com/?l=git&m=116406699903565&w=2

I thought this might be a place to put something like this, but having just 
updated my version of git from source, it doesn't seem to have been put in to 
git anywhere yet.



-- 
Alan Chandler

^ permalink raw reply	[flat|nested] 47+ messages in thread
* Re: [PATCH 6/5] git-rerere: document the 'clear' and 'diff' commands
@ 2024-09-29  3:34 Crystal M Baker
  0 siblings, 0 replies; 47+ messages in thread
From: Crystal M Baker @ 2024-09-29  3:34 UTC (permalink / raw)
  To: normalperson; +Cc: git, jnareb, junkio


Sent from my iPhone

^ permalink raw reply	[flat|nested] 47+ messages in thread

end of thread, other threads:[~2024-09-29  3:34 UTC | newest]

Thread overview: 47+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-03 17:01 Some advanced index playing Alan Chandler
2006-12-03 18:24 ` Linus Torvalds
2006-12-03 19:36   ` Junio C Hamano
2006-12-03 20:11   ` Alan Chandler
2006-12-03 20:19     ` Jakub Narebski
2006-12-03 20:29       ` Alan Chandler
2006-12-03 20:40     ` Linus Torvalds
2006-12-04 10:41   ` Junio C Hamano
2006-12-03 18:31 ` Jakub Narebski
2006-12-03 18:34 ` Linus Torvalds
2006-12-03 20:26   ` Junio C Hamano
2006-12-05  3:48     ` [PATCH] git-explain Junio C Hamano
2006-12-05  3:55       ` Nicolas Pitre
2006-12-05  3:57         ` J. Bruce Fields
2006-12-05  6:09           ` Junio C Hamano
2006-12-05  7:26             ` Jeff King
2006-12-05  9:21               ` Eric Wong
2006-12-08 10:49                 ` [RFC/PATCH 0/5] WIP status/rerere reporting Eric Wong
2006-12-08 10:49                 ` [PATCH 1/5] rerere: avoid misrecording on a skipped or aborted rebase/am Eric Wong
2006-12-08 19:33                   ` Junio C Hamano
2006-12-08 20:04                     ` [PATCH 6/5] git-rerere: document the 'clear' and 'diff' commands Eric Wong
2006-12-08 20:43                   ` [PATCH 1/5] rerere: avoid misrecording on a skipped or aborted rebase/am Junio C Hamano
2006-12-08 21:28                     ` Eric Wong
2006-12-08 21:29                       ` [PATCH] rerere: add clear, diff, and status commands Eric Wong
2006-12-08 21:29                         ` [PATCH] rerere: record (or avoid misrecording) resolved, skipped or aborted rebase/am Eric Wong
2006-12-08 21:44                           ` Jakub Narebski
2006-12-08 21:50                             ` Eric Wong
2006-12-09 20:08                           ` Junio C Hamano
2006-12-08 10:49                 ` [PATCH 2/5] status: show files that would have resolutions recorded by rerere Eric Wong
2006-12-08 10:49                 ` [PATCH 3/5] am and rebase resolve states get picked up by status/commit Eric Wong
2006-12-08 10:49                 ` [PATCH 4/5] am: run git rerere to record resolution on successful --resolved Eric Wong
2006-12-08 10:49                 ` [PATCH 5/5] rerere: add the diff command Eric Wong
2006-12-08 12:07                   ` Jakub Narebski
2006-12-05 17:34               ` [PATCH] git-explain Horst H. von Brand
2006-12-05  8:58             ` Johannes Schindelin
2006-12-05 21:00               ` J. Bruce Fields
2006-12-05  9:11             ` Raimund Bauer
2006-12-05 10:43       ` Jakub Narebski
2006-12-05 23:00         ` Martin Langhoff
2006-12-05 23:07           ` Junio C Hamano
2006-12-05 23:37             ` Johannes Schindelin
2006-12-05 23:57               ` Junio C Hamano
2006-12-06  0:07                 ` Carl Worth
2006-12-06  0:27                 ` Johannes Schindelin
2006-12-06  1:50                   ` Nicolas Pitre
2006-12-03 20:40   ` Some advanced index playing Alan Chandler
  -- strict thread matches above, loose matches on Subject: below --
2024-09-29  3:34 [PATCH 6/5] git-rerere: document the 'clear' and 'diff' commands Crystal M Baker

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).