From: Sam Ravnborg <sam@ravnborg.org>
To: Junio C Hamano <junkio@cox.net>
Cc: Linus Torvalds <torvalds@osdl.org>, git@vger.kernel.org
Subject: Re: "git reset" and newly created files.
Date: Sun, 21 Aug 2005 23:46:05 +0200 [thread overview]
Message-ID: <20050821214605.GA4134@mars.ravnborg.org> (raw)
In-Reply-To: <7vbr3rccjc.fsf@assigned-by-dhcp.cox.net>
>
> 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, and test. This time it is perfect.
> $ git add <whatever file you have changed>
> $ git commit -a -C ORIG_HEAD
>
> Do people find this a big problem?
I often do some maybe not that brilliant changes in my tree,
and when I then ask git to reset these I expect git to reset
everything.
After a git-reset HEAD^ I really expect git to have rewinded back till
where I started with no files added whatsoever.
>From the matter of least suprise git should not remember files added,
one have to do that by themself again if needed.
Sam
next prev parent reply other threads:[~2005-08-21 21:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-21 19:31 "git reset" and newly created files Junio C Hamano
2005-08-21 21:46 ` Sam Ravnborg [this message]
2005-08-22 8:17 ` 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=20050821214605.GA4134@mars.ravnborg.org \
--to=sam@ravnborg.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=torvalds@osdl.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