From: Eric Wong <e@80x24.org>
To: Pranit Bauva <pranit.bauva@gmail.com>
Cc: Norman Shapiro <norm@dad.org>, Git List <git@vger.kernel.org>
Subject: Re: Editing a typo in the message given to "git commit"
Date: Sun, 21 Aug 2016 21:29:27 +0000 [thread overview]
Message-ID: <20160821212927.GA8516@dcvr> (raw)
In-Reply-To: <CAFZEwPP=d6fN4MC09JGm4neY5MuXv1JBzx87HC+8=XjEp=DS_w@mail.gmail.com>
Pranit Bauva <pranit.bauva@gmail.com> wrote:
> On Sun, Aug 21, 2016 at 8:49 PM, <norm@dad.org> wrote:
> > I am learning how to use git. I would like to know:
> >
> > How can I correct a typo in the message I gave to an old "git commit"? I see
> > that the typo occurs in exactly two files in .git:
> >
> > .git/logs/refs/heads/master
> > .git/logs/HEAD
> >
> > /usr/bin/file says that they are both ASCII English text. So I could just
> > hand edit them. But that seems somehow sacrilegious and might break git.
>
> Messages to commits aren't just stored in these two files.
> Hand editing them will definitely break git and its highly advisable
> not to do that. In fact, for beginners its highly recommended to never
> visit the ".git" folder. What you need in this case is `git-rebase
> -i`. Using that you can go to the commit where you want to edit the
> message and mark it as "reword". Also if you want to make some
> modifications in the code, then you can mark it as "edit". Try `man
> git-rebase` for more info on the command.
Agreed. I use "git commit --amend" if it's the latest commit;
saves typing. Definitely don't edit anything in .git/logs/ by
hand.
> Also on a side note: This is a developer's mailing list. Please try to
> use the user's mailing list[1] for doubts. But if you have a doubt as
> to why this commands functions in a particular way (in which you think
> it should not) or you find a possible bug then feel free to discuss it
> on this mailing list. Also to save other people's time, first search
> for the doubt in the archives or google about it.
I disagree with this being a developer's-only list and pointing
users to a separate list. Every git user is a potential
developer (especially for a tool aimed for managing source).
Often user questions turn into bug reports aimed at
developers.
Nothing in our manpages even mentions this git-users list.
> [1]: https://groups.google.com/forum/#!forum/git-users
Keep in mind I have a strong anti-centralization bias and
Google is a big basket, here. I'll let their history of
discontinuing services like Google Reader, Google Code,
etc. speak for itself :)
next prev parent reply other threads:[~2016-08-21 21:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-21 15:19 Editing a typo in the message given to "git commit" norm
2016-08-21 15:32 ` Pranit Bauva
2016-08-21 21:29 ` Eric Wong [this message]
2016-08-22 19:02 ` Jakub Narębski
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=20160821212927.GA8516@dcvr \
--to=e@80x24.org \
--cc=git@vger.kernel.org \
--cc=norm@dad.org \
--cc=pranit.bauva@gmail.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 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).