* commit --strict feature request @ 2010-03-23 17:47 Dario Bertini 2010-03-24 1:10 ` Tim Mazid 2010-03-27 11:50 ` Tay Ray Chuan 0 siblings, 2 replies; 4+ messages in thread From: Dario Bertini @ 2010-03-23 17:47 UTC (permalink / raw) To: git 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 ) greetings ^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: commit --strict feature request 2010-03-23 17:47 commit --strict feature request Dario Bertini @ 2010-03-24 1:10 ` Tim Mazid 2010-03-24 1:14 ` Tim Mazid 2010-03-27 11:50 ` Tay Ray Chuan 1 sibling, 1 reply; 4+ messages in thread From: Tim Mazid @ 2010-03-24 1:10 UTC (permalink / raw) To: berdario, Git Mailing List > Date: Tue, 23 Mar 2010 18:47:16 +0100 > From: berdario@gmail.com > To: git@vger.kernel.org > Subject: commit --strict feature request > > 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 ) > > > greetings > -- > To unsubscribe from this list: send the line "unsubscribe git" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Hi, I think (someone correct me if I'm wrong) that being able to commit only part of the changes you made at a time is one of the major points of git (at least for me, anyway), so such a feature might go against the whole design. Also, what you could use is 'git commit -v', which allows you to review all the changes you are commiting, and allows you to write a better commit message anyway, as you can look at the changes, instead of going from memory. Another option might be to use a gui, such as 'git gui', which gives you a clear visual of what files have unstaged changes. Hope that helps until somebody competent replies. Tim. _________________________________________________________________ Browse profiles for FREE! Meet local singles online. http://clk.atdmt.com/NMN/go/150855801/direct/01/ ^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: commit --strict feature request 2010-03-24 1:10 ` Tim Mazid @ 2010-03-24 1:14 ` Tim Mazid 0 siblings, 0 replies; 4+ messages in thread From: Tim Mazid @ 2010-03-24 1:14 UTC (permalink / raw) To: berdario, Git Mailing List > From: timmazid@hotmail.com > To: berdario@gmail.com; git@vger.kernel.org > Subject: RE: commit --strict feature request > Date: Wed, 24 Mar 2010 12:10:06 +1100 > > >> Date: Tue, 23 Mar 2010 18:47:16 +0100 >> From: berdario@gmail.com >> To: git@vger.kernel.org >> Subject: commit --strict feature request >> >> 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 ) >> >> >> greetings >> -- >> To unsubscribe from this list: send the line "unsubscribe git" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > > > Hi, > > I think (someone correct me if I'm wrong) that being able to commit only part of the changes you made at a time is one of the major points of git (at least for me, anyway), so such a feature might go against the whole design. > > Also, what you could use is 'git commit -v', which allows you to review all the changes you are commiting, and allows you to write a better commit message anyway, as you can look at the changes, instead of going from memory. > > Another option might be to use a gui, such as 'git gui', which gives you a clear visual of what files have unstaged changes. > > Hope that helps until somebody competent replies. > > Tim. > > To unsubscribe from this list: send the line "unsubscribe git" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Oh, and I just realised, 'git commit' does actually show you a 'git status' (by default in v1.7.0) when you write your message anyway, so you don't even need the '-v' to see what files are staged/unstaged. _________________________________________________________________ Browse profiles for FREE! Meet local singles online. http://clk.atdmt.com/NMN/go/150855801/direct/01/ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: commit --strict feature request 2010-03-23 17:47 commit --strict feature request Dario Bertini 2010-03-24 1:10 ` Tim Mazid @ 2010-03-27 11:50 ` Tay Ray Chuan 1 sibling, 0 replies; 4+ messages in thread From: Tay Ray Chuan @ 2010-03-27 11:50 UTC (permalink / raw) To: Dario Bertini; +Cc: Tim Mazid, git Hi On Wed, Mar 24, 2010 at 1:47 AM, Dario Bertini <berdario@gmail.com> 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-03-27 11:51 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-03-23 17:47 commit --strict feature request Dario Bertini 2010-03-24 1:10 ` Tim Mazid 2010-03-24 1:14 ` Tim Mazid 2010-03-27 11:50 ` Tay Ray Chuan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).