> On 2022-10-28, Bram Moolenaar wrote:
>
> > Strange that this went missing. I'll add it now, please suggest a git
> > command for more info on the commit if needed.
>
> I understand your frustration with git. Here are a couple of
> commands I use to examine commits.
>
> To see the commit messages in a pager, including the names of the
> affected files:
>
> $ git log --name-only --decorate
>
> To see side-by-side diffs of the changes between two commits, for
> example, between the commit with the tag v9.0.0805 and its
> predecessor:
>
> $ git difftool v9.0.0805^..v9.0.0805
>
> You can specify any two commits by their tags, by their commit
> hashes, or by either of those with modifiers such as ^ to indicate
> a parent.
Commit hashes are unreadable, you can't really check what commit you are
using. That why I always use tags, they are human readable.
To get a diff like what I use in patch emails this is the closest I
could get:
% git difftool --extcmd="diff -c" --no-prompt v8.1.2098 v8.1.2099
> The best way to fix a bad commit really depends on the situation and
> on what has been pushed. It's generally difficult to change
> anything already pushed. In my limited experience, the safest way
> to make a change is to create a new commit that contains the code
> the way you want it, including any reversions, and commit and push
> that. Anything fancier than that, that you don't understand well,
> can easily lead to mistakes and more frustration.
When we moved from Google code to github someone created a very long
list of git commands to fixup all the problems in the history. It's a
lot of work to figure out and verify it ends up right, but it is
possible. I rather have someone else figure this out for me!
I also just get upset by how git commands are made in a way it seems
they are intentionally difficult to use. Like in intelligence test,
instead of being user friendly.
--
"Beware of bugs in the above code; I have only proved
it correct, not tried it." -- Donald Knuth
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20221028212331.58B781C0739%40moolenaar.net.