On Tue, 31 Jan 2006 22:42:05 -0800, Junio C Hamano wrote: > > There is no question we do not commit "another-file" and we do > commit changes to the "existing-file" as a whole. What should > we do to "a-new-file", and how do we explain why we do so to > novices? I'll offer a couple of ill-informed comments from a novice's point-of-view if I may. My first exposure to git (about 1 week ago) was "A short git tutorial" [*] I found the discussion of the index, git-update-index, and the subtle distinctions between the various git-diff commands rather intimidating for an initial introduction. After getting to know the system better over the past week, it seems it should be possible to have a class of "novice ready" tools that provide for common use cases and that never require any mention of the index in their documentation. If so, that seems to me a useful goal to work toward and a useful guide in this discussion. > We could make "git commit" without paths to mean the current > "-a" behaviour, which would match CVS behaviour more closely. Again, my novice experience leads me to favor that change. After reading the tutorial, I had the following sequence in mind for committing an edited file: git update-index edited-file git commit which seemed like more pain than strictly necessary. The next day, when I went to the linux.conf.au tutorial and saw Linus use: git commit -a for the same operation it was a breath of fresh air. I was left scratching my head wondering why the -a behavior wasn't the default for "git commit" with no paths. > However, it would make commit after a merge conflict resolution > in a dirty working tree _very_ dangerous -- it may give more > familiar feel to CVS people, but it is not an improvement for > git people at all. I would rather not. I'm still not "git people" I guess. Could you explain what the danger is here? And is it something the tool could detect and prevent? -Carl [*] http://www.kernel.org/pub/software/scm/git/docs/core-tutorial.html [* A better initial introduction for me would likely have been "A tutorial introduction to git": http://www.kernel.org/pub/software/scm/git/docs/tutorial.html so a link to the latter from the first paragraph or so of the former might be very helpful.