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