Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is about common practices. I have a git repository containing the linux kernel. Now I want to build this linux kernel. Should I copy the sources outside the git repository and then build the kernel ? Or, should I run the build inside the git repository itself? My concern is about the many files that are created during a build process that should, I think, be not included in the git repository.

share|improve this question
up vote 5 down vote accepted

It's okay to compile in the repository itself. New files are ignored by Git until you add them manually for the first time. (You can use make mrproper or git clean -dfx to get rid of compilation output.)

share|improve this answer
can't I do a make clean ? is that the same as make mrproper ? – AnkurVj Aug 26 '11 at 8:28
@AnkurVj: make clean usually cleans just the compilation output (object files). make distclean removes everything that shouldn't be included in published tarballs of the source code. make mrproper is specific to Linux source and is something in-between: more aggressive than make clean but less so than make distclean. See Makefile lines 1148 and below. – grawity Aug 26 '11 at 8:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.