Re: "git reset" and newly created files.

2005-08-22 Thread Junio C Hamano
Sam Ravnborg <[EMAIL PROTECTED]> writes: >> So you would naturally be tempted to do this: >> >> ... Re-edit, compile, and test. This time it is perfect. >> $ git commit -a -C ORIG_HEAD >> >> Well, not really. You can lose any file newly created in >> ORIG_HEAD this way. Instead, you n

Re: "git reset" and newly created files.

2005-08-21 Thread Sam Ravnborg
> > So you would naturally be tempted to do this: > > ... Re-edit, compile, and test. This time it is perfect. > $ git commit -a -C ORIG_HEAD > > Well, not really. You can lose any file newly created in > ORIG_HEAD this way. Instead, you need to do this: > > ... Re-edit, compile,

"git reset" and newly created files.

2005-08-21 Thread Junio C Hamano
When you made a mistake and committed a set of incomplete changes, the "git reset" command comes handy. ... Edit, compile, and test. $ git commit -s -m 'The perfect change.' ... Test again, OOPS it fails --- it was not perfect. $ git reset HEAD^ foo: needs update bar: needs