Johan Herland [off-list ref] writes:
What about making "git clean" _stash_ your changes instead of deleting them
(so that you can undo the clean)? Preferably they should be stashed
somewhere _other_ than where "git stash" does its thing. "git clean" could
even delete the stash immediately, but keep the reflog around so that
the "clean" at least could be undone within 30 days (or whatever is the
current default).
Thoughts?
Unthoughts. That does not mesh with the way how world works.
"git clean" is about things that git usually do not care about
(i.e. things not in .gitignore, or even in .gitignore when -x is
given). Everything else including "git stash" is all about what
git cares about (i.e. tracked paths).
On Thu, 1 Nov 2007, Junio C Hamano wrote:
"git clean" is about things that git usually do not care about
(i.e. things not in .gitignore, or even in .gitignore when -x is
given). Everything else including "git stash" is all about what
git cares about (i.e. tracked paths).
Right. I *love* "git clean". Real men have everything they care about
tracked by git, and thus by definition "git clean" is the safest operation
possible. I don't understand how anybody can call it "unsafe".
I just wish it was quiet by default - right now it takes a _loong_ time to
clean out your crud just because it scrolls forever talking about all
those girly files you don't want to keep - and that it had -x and -d on by
default, so that us *real* men wouldn't have to type so much.
But making it accept combined options, so that you can do "git clean -xdq"
would certainly already be a huge improvement.
But yeah, I guess we could make the "clean.Imagirlyman" option (or however
the "please-don't-hurt-me-by-default" option is spelled) the default. That
way I'd just feel *extra* manly for immediately disabling it, and laughing
at you wimps.
Linus
On Thursday, November 1, 2007 at 15:05:44 (-0700) Linus Torvalds writes:
...
But yeah, I guess we could make the "clean.Imagirlyman" option (or however
the "please-don't-hurt-me-by-default" option is spelled) the default. That
way I'd just feel *extra* manly for immediately disabling it, and laughing
at you wimps.
Precisely my sentiments.
Bill
On Thu, Nov 01, 2007 at 03:05:44PM -0700, Linus Torvalds wrote:
On Thu, 1 Nov 2007, Junio C Hamano wrote:
quoted
"git clean" is about things that git usually do not care about
(i.e. things not in .gitignore, or even in .gitignore when -x is
given). Everything else including "git stash" is all about what
git cares about (i.e. tracked paths).
BTW, it comes from Cogito. Pavel Roskin is the author of the original
Cogito script and I'm not sure if it came there from anywhere else or is
an original "invention".
Right. I *love* "git clean". Real men have everything they care about
tracked by git, and thus by definition "git clean" is the safest operation
possible. I don't understand how anybody can call it "unsafe".
I agree! If you want to keep anything around in git-tracked tree, tell
git about it! (Either marking it as ignored or adding it to the index.)
I think I wasn't too fond of it originally but now tend to use it a lot
to keep my trees clean of temporary cruft.
I just wish it was quiet by default - right now it takes a _loong_ time to
clean out your crud just because it scrolls forever talking about all
those girly files you don't want to keep - and that it had -x and -d on by
default, so that us *real* men wouldn't have to type so much.
I do not agree with either, though. Having it verbose by default makes
it at least obvious that something potentially, uh, surprising is going
on; and I _prefer_ the non-x behaviour. If I told git that it should
ignore $file, it better not touch it.
But yeah, I guess we could make the "clean.Imagirlyman" option (or however
the "please-don't-hurt-me-by-default" option is spelled) the default. That
way I'd just feel *extra* manly for immediately disabling it, and laughing
at you wimps.
Yeah!
--
Petr "Pasky, laughing at the wimps" Baudis
We don't know who it was that discovered water, but we're pretty sure
that it wasn't a fish. -- Marshall McLuhan