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

Re: commit --strict feature request

From
Tay Ray Chuan <rctay89@gmail.com>
Date
Mar 27, 2010, 11:50 UTC
Message-ID
<be6fef0d1003270450s32ab997cmfe6f6b7e6e4a16a8@mail.gmail.com>
In-Reply-To
<4BA8FEA4.60504@gmail.com>
Hi
On Wed, Mar 24, 2010 at 1:47 AM, Dario Bertini <berdario@gmail.com> wrote:
Show 8 quoted lines
> Hi, i usually use bzr, and today i was searching for a commit --strict
> equivalent in git... i asked around and it seems there isn't one, so i'm
> writing this.
>
> basically, by doing commit --strict it refuses to commit if there are
> untracked (and thus not ignored) files in the tree, this helps against
> forgetting to add new files (actually i find it so useful that i've even
> changed commit to be an alias to commit --strict in my bzr aliases )
check out the pre-commit hook:
  http://www.kernel.org/pub/software/scm/git/docs/githooks.html#_pre_commit

You could make it scan the directory, then veto the execution of git-commit if any untracked files are found.

-- 
Cheers,
Ray Chuan
Previous: Tim Mazid
Message 4 of 4 in “commit --strict feature request”
  1. Dario BertiniMar 23, 2010
  2. Tim MazidMar 24, 2010
  3. Tim MazidMar 24, 2010
  4. Tay Ray ChuanMar 27, 2010

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.