From: Theodore Ts'o <tytso@mit.edu>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jacob Keller <jacob.keller@gmail.com>,
George Spelvin <linux@horizon.com>,
Git List <git@vger.kernel.org>
Subject: Re: Why not git reset --hard <path>?
Date: Mon, 28 Sep 2015 17:36:01 -0400 [thread overview]
Message-ID: <20150928213601.GA4071@thunk.org> (raw)
In-Reply-To: <xmqqvbaub5s4.fsf@gitster.mtv.corp.google.com>
I personally have in my .gitconfig:
[alias]
revert-file = checkout HEAD --
I'm not sure revert-file is the best name, but it's what I've used
because I've been contaminated by the concept/naming of "p4 revert",
which I do use a fair amount to undo local edits for one or more files
when I've been forced to use perforce or perforce-like systems. Given
that it confuses the concept of how "git revert" works, maybe
something like "git unedit <pathspec>" would work better.
Given though it's so easy to address this with a single line in a
user's .gitconfig, I guess the question is whether it's worthwhile to
make a change that would be visible to all users, and perhaps more
importantly, all new users to git.
- Ted
next prev parent reply other threads:[~2015-09-28 21:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-28 20:34 Why not git reset --hard <path>? George Spelvin
2015-09-28 20:42 ` Junio C Hamano
2015-09-28 20:53 ` Jacob Keller
2015-09-28 21:19 ` Junio C Hamano
2015-09-28 21:36 ` Theodore Ts'o [this message]
2015-09-29 7:06 ` Jacob Keller
2015-09-29 16:15 ` George Spelvin
2015-09-29 19:40 ` Philip Oakley
2015-09-28 22:36 ` George Spelvin
2015-09-28 22:58 ` Junio C Hamano
2015-09-28 23:52 ` George Spelvin
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=20150928213601.GA4071@thunk.org \
--to=tytso@mit.edu \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jacob.keller@gmail.com \
--cc=linux@horizon.com \
/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.