Thread (5 messages) flat view 5 messages, 2 authors, 2016-06-15

Re: seperate commits for objects already updated in index?

From: Linus Torvalds <torvalds@osdl.org>
Date: 2016-06-15 22:42:21


On Tue, 14 Mar 2006, Paul Jakma wrote:
On Tue, 14 Mar 2006, Linus Torvalds wrote:
quoted
The simplest thing to do is to do

	git reset

to reset your index back to your HEAD (but obviously DON'T use the "-f"
flag, which will also force the working tree!).
Ah, of course! (I knew I was being dumb ;) ).
Well, I actually think git is being somewhat of an ass, for no really good 
reason. It's true that you are doing something pretty strange by _both_ 
using "git-update-index" and "git commit -o" but the fact is, at least 
when adding files, that would be expected (ie you have to mark a file 
in the index to add it).

I also think that test is historical, from before Junio cleaned up how 
"git commit" worked - it _used_ to be that "git commit" would work in the 
current index, but these days it generates a new index to commit when you 
do "-o", so there's really no _technical_ reason to refuse the partial 
commit any more as far as I can see.

So I don't know. I don't think you were being dumb, I think git could have 
been friendlier to you.

		Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help