From: Tay Ray Chuan Date: Sat, 27 Mar 2010 11:50:52 GMT Subject: Re: commit --strict feature request Message-ID: In-Reply-To: <4BA8FEA4.60504@gmail.com> Hi On Wed, Mar 24, 2010 at 1:47 AM, Dario Bertini wrote: > 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