Git Product home page Git Product logo

Comments (5)

JasonGross avatar JasonGross commented on June 12, 2024

Note that git clean -x will remove untrackted files too (git clean -X will remove only the untracked files).

from unimath.

benediktahrens avatar benediktahrens commented on June 12, 2024

On 12/07/2014 12:38 PM, Jason Gross wrote:

Note that git clean -x will remove untrackted files too (git clean -X will remove only the untracked files).

Thanks for the hint.
I would still prefer a more fine-grained solution via make, in order to
avoid deleting untracked Coq files by accident.

from unimath.

DanGrayson avatar DanGrayson commented on June 12, 2024

Once one of the makefiles that make reads has a syntax error in it, make will always refuse to
do anything. So the only way to get make to do something is to prevent it from including the
erroneous file. That can be done by adding a test for the setting of a make variable. For example,
if you had to type

    make CLEAN=yes

instead of

    make clean

would that be too counterintuitive?

Another point about git clean is that git clean -Xdfq is that the -X tells git to
remove just the files ignored by being mentioned in .gitignore, so it's safer than
git clean -xdfq, which might remove a file you want to keep. For me, that's a perfect
way to get cleaning done.

from unimath.

benediktahrens avatar benediktahrens commented on June 12, 2024

On 12/08/2014 03:27 PM, Daniel R. Grayson wrote:

Once one of the makefiles that make reads has a syntax error in it, make will always refuse to
do anything. So the only way to get make to do something is to prevent it from including the
erroneous file. That can be done by adding a test for the setting of a make variable. For example,
if you had to type
make CLEAN=yes
instead of
make clean
would that be too counterintuitive?

Another point about git clean is that "git clean -Xdfq" is that the -X tells git to
remove just the files ignored by being mentioned in .gitignore, so it's safer than
"git clean -xdfq", which might remove a file you want to keep. For me, that's a perfect
way to get cleaning done.

Ok. Instead of implementing a hack in the Makefile it is probably better
to simply add that git clean command to the README. I will do that right
now.

from unimath.

benediktahrens avatar benediktahrens commented on June 12, 2024

Not touching the Makefile, but adding a remark in README instead.

from unimath.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.