git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: The git spring cleanup challenge

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Jun 3, 2021, 08:15 UTC
Message-ID
<87bl8n73om.fsf@evledraar.gmail.com>
In-Reply-To
<60b5d281552d6_e359f20828@natae.notmuch>
On Tue, Jun 01 2021, Felipe Contreras wrote:
Show 7 quoted lines
>   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
    
Previous: Felipe ContrerasNext: Felipe Contreras
Message 49 of 55 in “The git spring cleanup challenge”
  1. Felipe ContrerasJun 1, 2021
  2. AndyJun 1, 2021
  3. Felipe ContrerasJun 1, 2021
  4. Đoàn Trần Công DanhJun 1, 2021
  5. Felipe ContrerasJun 1, 2021
  6. Đoàn Trần Công DanhJun 1, 2021
  7. Felipe ContrerasJun 1, 2021
  8. Đoàn Trần Công DanhJun 1, 2021
  9. Felipe ContrerasJun 1, 2021
  10. Đoàn Trần Công DanhJun 2, 2021
  11. Felipe ContrerasJun 2, 2021
  12. Ævar Arnfjörð BjarmasonJun 3, 2021
  13. Felipe ContrerasJun 3, 2021
  14. Sergey OrganovJun 3, 2021
  15. Ævar Arnfjörð BjarmasonJun 3, 2021
  16. Felipe ContrerasJul 2, 2021
  17. Ævar Arnfjörð BjarmasonJul 2, 2021
  18. Felipe ContrerasJul 2, 2021
  19. David AguilarJun 1, 2021
  20. Junio C HamanoJun 1, 2021
  21. Junio C HamanoJun 1, 2021
  22. Felipe ContrerasJun 1, 2021
  23. Johannes SixtJun 2, 2021
  24. Felipe ContrerasJun 2, 2021
  25. Junio C HamanoJun 2, 2021
  26. Felipe ContrerasJun 2, 2021
  27. Đoàn Trần Công DanhJun 2, 2021
  28. Johannes SixtJun 2, 2021
  29. Felipe ContrerasJun 1, 2021
  30. Sergey OrganovJun 2, 2021
  31. Junio C HamanoJun 3, 2021
  32. Sergey OrganovJun 3, 2021
  33. Sergey OrganovJun 1, 2021
  34. Felipe ContrerasJun 1, 2021
  35. Sergey OrganovJun 2, 2021
  36. Felipe ContrerasJun 2, 2021
  37. Sergey OrganovJun 2, 2021
  38. Felipe ContrerasJun 2, 2021
  39. Sergey OrganovJun 2, 2021
  40. Junio C HamanoJun 3, 2021
  41. Felipe ContrerasJun 3, 2021
  42. Elijah NewrenJun 3, 2021
  43. Felipe ContrerasJun 3, 2021
  44. Elijah NewrenJun 3, 2021
  45. Felipe ContrerasJun 3, 2021
  46. Sergey OrganovJun 3, 2021
  47. Bagas SanjayaJun 2, 2021
  48. Felipe ContrerasJun 2, 2021
  49. Ævar Arnfjörð BjarmasonJun 3, 2021
  50. Felipe ContrerasJun 3, 2021
  51. Ævar Arnfjörð BjarmasonJun 3, 2021
  52. Phillip WoodJun 3, 2021
  53. Ævar Arnfjörð BjarmasonJun 3, 2021
  54. Phillip WoodJun 4, 2021
  55. Felipe ContrerasJun 3, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.