From: Jonathan del Strother Date: Wed, 18 Nov 2009 13:18:29 GMT Subject: Re: Hey - A Conceptual Simplication.... Message-ID: <57518fd10911180518y4dbb65e2kf28d8ccc88bfb13b@mail.gmail.com> In-Reply-To: <005a01ca684e$71a1d710$54e58530$@com> 2009/11/18 George Dennie : > A Clean checkout command might be... > > The Git model does not seem to go far enough conceptually, for some > unexplainable reason... > > In particular, why is Git not treating the entire working tree as the > versioned document (qualified of course by the .gitignore file). > > Instead, Git is treating a manually maintained list of files within the > working tree as the versioned document, this list being initialized and > manually amended by the "Git add/rm/mv" commands, etc. > > The result is conceptual complexity and rather counter-intuitive behavior. > For example, adding and renaming files outside of Git is not considered > editing the version until you subsequently do a "Git Add ." Contrast that > with editing or deleting files outside of Git. Yet adding and renaming files > and folders is a significant part of substantive projects, especially in the > early stages and experimental branches. > > Granted, this is not a big deal functionally, but what is being lost is > conceptual simplicity (and consistency, in my book) and conceptual > simplicity is a key value point, if not THE key. > > Also can we augment checkout to totally CLEAN the working directory prior to > a restore. If necessary we can augment .gitignore to stipulate those files > or folders that should be excluded from the cleaning. This suggestion is in > recognition of the fact that if you  are not versioning the file, it is > typically trash; which becomes the case when the entire working treat is > treated as the versioned document. > > Consequently, I recommend the following new commands: >        "Git commit -x"   -- performs a "Git add ." then a "Git commit" >        "Git checkout -x" -- that clean the working tree prior to perform a > checkout > Perhaps try 'git commit -a' and 'git checkout -f' ?