On Wed, 2014-08-20 at 06:50 +0200, Magnus Therning wrote:
> Is there a specific reason you aren't using a separate build
> directory?  (AFAIU this is the convention for CMake.)

Historical precedence.  People are used to doing in-source builds and
some of our scripting for making releases, etc. expects to find things
in those places.

I completely agree that it would be great to move to an out-of-source
build as the default but that's a larger project.  In any event, this
question is more abstract, summed up by this:

> > Does it seem incorrect to anyone else that "git clean -X" doesn't delete
> > all the files in your workspace that are considered ignored by "git
> > status"?

> How does `git clean -fdx` behave?

It does clean up these files... plus more as below.

> I've never really understood the difference between -x and -X, but
> I've always used only -x and it behaves exactly the way I expect it
> to.

According to the docs (and this seems true to me), -X removes all files
matched by .gitignore (except, in my case, not) while -x removes all
ignored files AND all untracked files [*].

The thing about -x is you could lose work; if you had a new file that
you hadn't gotten around to "git add"'ing, or you had a log file that
you still wanted to look at but wasn't matched by a .gitignore line,
etc. then "-x" will delete it while "-X" does not.

The "-X" flag only deletes things that you've explicitly marked
(via .gitignore) as ignorable, but leaves things it isn't sure about
(untracked files) alone.

[*] Technically what it does is pretend there's no .gitignore file, so
that all ignored files become untracked, then delete all untracked

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to