All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: The git spring cleanup challenge
Date: Thu, 03 Jun 2021 10:15:48 +0200	[thread overview]
Message-ID: <87bl8n73om.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <60b5d281552d6_e359f20828@natae.notmuch>


On Tue, Jun 01 2021, Felipe Contreras wrote:

>   1. Remove all the configuration that is not essential (just leave
>      user.name and user.email or equivalent)
>   2. Pick 2 configurations you think you can't live without. You are not
>      allowed to change them afterwards.
>   3. Every day you can add 1 additional configuration (and update it the
>      next day).
>   4. The moment you add a 4th configuration you lose.

This proposal is somewhere between picking which 2 of your 4 kids gets
to live and asking an alcoholic to stop drinking for a week just so he
can tell you at the end what his favorite drinks are :)

So I skipped the "disable most config", but for what it's worth I think
I'd miss these the most, I couldn't pick just N favorites, sorry:

 * diff.colorMoved=true: super useful, but I'd be vary of turning it on
   by default in its current form. E.g. on gcc.git's changelog files it
   has really pathological performance characteristics.

 * rebase.rescheduleFailedExec=true: Relatively new, but I'd find it
   hard to live without this now.

 * rerere.*: others have mentioned "should be enabled by default".

   But on that topic I set gc.rerereResolved="1 year ago", with
   managing/merging topics in git.git the default of 60 days is way too
   aggressive.

 * merge.defaultToUpstream: ditto other discussion, should be "true" by
   default.

 * checkout.defaultRemote=origin: I introduced this, so I'm biased, but
   I find it super useful. Usually because I do "git branch -m
   new-branch" on master to create topics, and then "git checkout
   master" to get a master back (or use the existing one).

 * commit.verbose=true: so you know what you're looking at in doing in
   "git commit --amend".

 * grep.patternType=perl: Another personal soap box (but really, BRE
   anywhere sucks).

I also have a bunch of aliases that would not be useful to a general
audience, but which I find I can't live without, some of the most
commonly used ones:

    # Log with "less" n/p already going to the next/prev commit
    log-psfd = "!f() { PAGER=\"less -p'^commit'\" git log -p --stat --full-diff $@; }; f"
    # cutesy commit aliases (I guess "commit" is both "ci" and "c" here, but...)
    cif = commit --fixup
    cis = commit --squash
    ca = commit --amend
    cane = commit --amend --no-edit

Similarly rebase is "r", "--interactive" is "ri", "--abort", and
"--continue" are "ra" and "rc".

If anyone's interested in the rest / full set:
https://github.com/avar/dotfiles/blob/master/.gitconfig
    


  parent reply	other threads:[~2021-06-03  8:28 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01  6:24 The git spring cleanup challenge Felipe Contreras
2021-06-01  7:28 ` Andy
2021-06-01 10:07   ` Felipe Contreras
2021-06-01  7:47 ` Đoàn Trần Công Danh
2021-06-01 10:48   ` Felipe Contreras
2021-06-01 11:40     ` Đoàn Trần Công Danh
2021-06-01 12:21       ` Felipe Contreras
2021-06-01 12:28         ` Đoàn Trần Công Danh
2021-06-01 13:14           ` Felipe Contreras
2021-06-02  4:13     ` Đoàn Trần Công Danh
2021-06-02  4:53       ` Felipe Contreras
2021-06-03  8:03         ` Ævar Arnfjörð Bjarmason
2021-06-03 10:06           ` Felipe Contreras
2021-06-03 10:49             ` Sergey Organov
2021-06-03 12:18             ` Ævar Arnfjörð Bjarmason
2021-07-02 10:12               ` Felipe Contreras
2021-07-02 11:43                 ` Ævar Arnfjörð Bjarmason
2021-07-02 21:54                   ` Felipe Contreras
2021-06-01 21:56 ` David Aguilar
2021-06-01 22:28   ` Junio C Hamano
2021-06-01 22:49     ` Junio C Hamano
2021-06-01 23:44       ` Felipe Contreras
2021-06-02  6:47         ` Johannes Sixt
2021-06-02  6:53           ` Felipe Contreras
2021-06-02 11:00           ` Junio C Hamano
2021-06-02 11:24             ` Felipe Contreras
2021-06-02 11:44             ` Đoàn Trần Công Danh
2021-06-02 18:13               ` Johannes Sixt
2021-06-01 23:12     ` Felipe Contreras
2021-06-02 12:13       ` Sergey Organov
2021-06-03  3:00         ` Junio C Hamano
2021-06-03 10:00           ` Sergey Organov
2021-06-01 22:33 ` Sergey Organov
2021-06-01 23:19   ` Felipe Contreras
2021-06-02 12:19     ` Sergey Organov
2021-06-02 21:28       ` Felipe Contreras
2021-06-02 22:05         ` Sergey Organov
2021-06-02 22:33           ` Felipe Contreras
2021-06-02 23:09             ` Sergey Organov
2021-06-03  0:06       ` Junio C Hamano
2021-06-03  0:48         ` Felipe Contreras
2021-06-03  0:26   ` Elijah Newren
2021-06-03  1:36     ` Felipe Contreras
2021-06-03  4:25       ` Elijah Newren
2021-06-03  9:52         ` Felipe Contreras
2021-06-03  9:48     ` Sergey Organov
2021-06-02  3:43 ` Bagas Sanjaya
2021-06-02  3:59   ` Felipe Contreras
2021-06-03  8:15 ` Ævar Arnfjörð Bjarmason [this message]
2021-06-03 11:09   ` Felipe Contreras
2021-06-03 12:31     ` Ævar Arnfjörð Bjarmason
2021-06-03 14:28       ` Phillip Wood
2021-06-03 16:44         ` Ævar Arnfjörð Bjarmason
2021-06-04 10:24           ` Phillip Wood
2021-06-03 17:28       ` Felipe Contreras

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=87bl8n73om.fsf@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.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 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.