git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: ``git clean -xdf'' and ``make clean''

From
CWCornelius Weig <cornelius.weig@tngtech.com>
Date
Feb 7, 2017, 15:07 UTC
Message-ID
<fe8595aa-0395-e948-13e9-f952541d106e@tngtech.com>
In-Reply-To
<CAGP6PO+qD6eRkKbWAxOfiqUQw8o+dOfgwgvt_8OxHQ5ocAopEQ@mail.gmail.com>
On 02/07/2017 03:17 PM, Hongyi Zhao wrote:
Show 6 quoted lines
> Hi all,
> 
> In order to delete all of the last build stuff, does the following two
> methods equivalent or not?
> 
> ``git clean -xdf'' and ``make clean''
No, it is not equivalent.
* `make clean` removes any build-related files (assuming that the
`clean` target is properly written). To see exactly what it would do,
run `make clean -n`. Judging from your question, I think this is what
you want to do.
* `git clean -xdf` would remove any files that git does not track. This
also includes build-related files, but also any other files that happen
to be in your working directory. For example, any output from `git
format-patch` would be removed by this, but not `make clean`.
Previous: Hongyi ZhaoNext: Jacob Keller
Message 2 of 3 in “``git clean -xdf'' and ``make clean''”
  1. Hongyi ZhaoFeb 7, 2017
  2. Cornelius WeigFeb 7, 2017
  3. Jacob KellerFeb 7, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.