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

Re: Automatically Add .gitignore Files

From
Stephan Beyer <s-beyer@gmx.net>
Date
Feb 9, 2017, 00:01 UTC
Message-ID
<64116970-0907-2e95-e49d-068e1a25ffa6@gmx.net>
In-Reply-To
<xmqqmvdwtfq8.fsf@gitster.mtv.corp.google.com>
> I am tempted to say that there should be a way to somehow forbid use
> of the "-m" option to "git commit" by default, until the user gains
> more familiarity with use of Git.

Since I am using git, I am tempted to say that "git commit -m" should be abolished. If I tell somebody how to use git, I never mention "git commit -m". Unluckily they find it out themselves... ;D

The typical observations I have when people use "git commit -m":
 * The commit messages are either too long (in one line!) or
   too meaningless.
 * People don't check what they added and commit wrong stuff.
 * People make fast temporary commits with "asdafsd" commit messages.
   Then they get distracted for some time and work on another branch.
   When they turn back to the old branch they don't know what "asdafsd"
   was...

Thanks to git rebase -i and/or git commit --amend, it is all not too bad after all ;D

Best
  Stephan
Previous: Junio C HamanoNext: Duy Nguyen
Message 3 of 5 in “Automatically Add .gitignore Files”
  1. ThangalinFeb 8, 2017
  2. Junio C HamanoFeb 8, 2017
  3. Stephan BeyerFeb 9, 2017
  4. Duy NguyenFeb 9, 2017
  5. ThangalinFeb 9, 2017

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.