{"thread":{"id":"23153","subject":"commit --strict feature request","startedAt":"2010-03-23T17:47:16Z","lastAt":"2010-03-27T11:50:52Z","messageCount":4,"participants":["Dario Bertini","Tim Mazid","Tay Ray Chuan"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"137655","messageId":"4BA8FEA4.60504@gmail.com","threadId":"23153","inReplyTo":null,"subject":"commit --strict feature request","fromName":"Dario Bertini","fromEmail":"berdario@gmail.com","sentAt":"2010-03-23T17:47:16Z","receivedAt":"2010-03-23T17:47:16Z","isPatch":false,"sender":{"key":"berdario@gmail.com","avatar":"https://gravatar.com/avatar/8a656e2249beafba0dc194c046514d0d5d2b89559045de75b829d5369fd6c28e?d=mp&s=160"},"body":"Hi, i usually use bzr, and today i was searching for a commit --strict \nequivalent in git... i asked around and it seems there isn't one, so i'm \nwriting this.\n\nbasically, by doing commit --strict it refuses to commit if there are \nuntracked (and thus not ignored) files in the tree, this helps against \nforgetting to add new files (actually i find it so useful that i've even \nchanged commit to be an alias to commit --strict in my bzr aliases )\n\n\ngreetings\n"},{"id":"137679","messageId":"SNT124-W659C1D09B747F338E04DF4C4250@phx.gbl","threadId":"23153","inReplyTo":"4BA8FEA4.60504@gmail.com","subject":"RE: commit --strict feature request","fromName":"Tim Mazid","fromEmail":"timmazid@hotmail.com","sentAt":"2010-03-24T01:10:06Z","receivedAt":"2010-03-24T01:10:06Z","isPatch":false,"sender":{"key":"timmazid@hotmail.com","avatar":null},"body":"\n> Date: Tue, 23 Mar 2010 18:47:16 +0100\n> From: berdario@gmail.com\n> To: git@vger.kernel.org\n> Subject: commit --strict feature request\n> \n> Hi, i usually use bzr, and today i was searching for a commit --strict \n> equivalent in git... i asked around and it seems there isn't one, so i'm \n> writing this.\n> \n> basically, by doing commit --strict it refuses to commit if there are \n> untracked (and thus not ignored) files in the tree, this helps against \n> forgetting to add new files (actually i find it so useful that i've even \n> changed commit to be an alias to commit --strict in my bzr aliases )\n> \n> \n> greetings\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at http://vger.kernel.org/majordomo-info.html\n \n \nHi,\n \nI 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.\n \nAlso, 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.\n \nAnother option might be to use a gui, such as 'git gui', which gives you a clear visual of what files have unstaged changes.\n \nHope that helps until somebody competent replies.\n \nTim. \t\t \t   \t\t  \n_________________________________________________________________\nBrowse profiles for FREE! Meet local singles online.\nhttp://clk.atdmt.com/NMN/go/150855801/direct/01/"},{"id":"137680","messageId":"SNT124-W65458CD48BBB9A6A831FDEC4250@phx.gbl","threadId":"23153","inReplyTo":"SNT124-W659C1D09B747F338E04DF4C4250@phx.gbl","subject":"RE: commit --strict feature request","fromName":"Tim Mazid","fromEmail":"timmazid@hotmail.com","sentAt":"2010-03-24T01:14:21Z","receivedAt":"2010-03-24T01:14:21Z","isPatch":false,"sender":{"key":"timmazid@hotmail.com","avatar":null},"body":"\n> From: timmazid@hotmail.com\n> To: berdario@gmail.com; git@vger.kernel.org\n> Subject: RE: commit --strict feature request\n> Date: Wed, 24 Mar 2010 12:10:06 +1100\n>\n>\n>> Date: Tue, 23 Mar 2010 18:47:16 +0100\n>> From: berdario@gmail.com\n>> To: git@vger.kernel.org\n>> Subject: commit --strict feature request\n>>\n>> Hi, i usually use bzr, and today i was searching for a commit --strict\n>> equivalent in git... i asked around and it seems there isn't one, so i'm\n>> writing this.\n>>\n>> basically, by doing commit --strict it refuses to commit if there are\n>> untracked (and thus not ignored) files in the tree, this helps against\n>> forgetting to add new files (actually i find it so useful that i've even\n>> changed commit to be an alias to commit --strict in my bzr aliases )\n>>\n>>\n>> greetings\n>> --\n>> To unsubscribe from this list: send the line \"unsubscribe git\" in\n>> the body of a message to majordomo@vger.kernel.org\n>> More majordomo info at http://vger.kernel.org/majordomo-info.html\n>\n>\n> Hi,\n>\n> 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.\n>\n> 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.\n>\n> Another option might be to use a gui, such as 'git gui', which gives you a clear visual of what files have unstaged changes.\n>\n> Hope that helps until somebody competent replies.\n>\n> Tim.\n>\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at http://vger.kernel.org/majordomo-info.html\n \nOh, 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. \t\t \t   \t\t  \n_________________________________________________________________\nBrowse profiles for FREE! Meet local singles online.\nhttp://clk.atdmt.com/NMN/go/150855801/direct/01/"},{"id":"137943","messageId":"be6fef0d1003270450s32ab997cmfe6f6b7e6e4a16a8@mail.gmail.com","threadId":"23153","inReplyTo":"4BA8FEA4.60504@gmail.com","subject":"Re: commit --strict feature request","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2010-03-27T11:50:52Z","receivedAt":"2010-03-27T11:50:52Z","isPatch":false,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"Hi\n\nOn Wed, Mar 24, 2010 at 1:47 AM, Dario Bertini <berdario@gmail.com> wrote:\n> Hi, i usually use bzr, and today i was searching for a commit --strict\n> equivalent in git... i asked around and it seems there isn't one, so i'm\n> writing this.\n>\n> basically, by doing commit --strict it refuses to commit if there are\n> untracked (and thus not ignored) files in the tree, this helps against\n> forgetting to add new files (actually i find it so useful that i've even\n> changed commit to be an alias to commit --strict in my bzr aliases )\n\ncheck out the pre-commit hook:\n\n  http://www.kernel.org/pub/software/scm/git/docs/githooks.html#_pre_commit\n\nYou could make it scan the directory, then veto the execution of\ngit-commit if any untracked files are found.\n\n-- \nCheers,\nRay Chuan\n"}]}