From: W. Trevor King Date: Fri, 27 Jan 2012 18:00:25 +0000 (-0500) Subject: Add `git clean` notes to notes.org. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ca768b576ae44d105fd0cd4bfff070f67bf150af;p=blog.git Add `git clean` notes to notes.org. --- diff --git a/posts/Git/notes.org b/posts/Git/notes.org index 6ec07a4..3bff515 100644 --- a/posts/Git/notes.org +++ b/posts/Git/notes.org @@ -761,6 +761,28 @@ have push access, use: after deleting the branch in your local repository. +** Clean out your working directory + +To list files that will be removed (a dry run), use: + + : git clean -dxn + +Then remove the files with + + : git clean -dxf + + |--------+-------------------------------------------------------------| + | Option | Meaning | + |--------+-------------------------------------------------------------| + | =-d= | Remove untracked directories in addition to untracked files | + |--------+-------------------------------------------------------------| + | =-x= | Don’t use the ignore rules (remove all untracked files) | + |--------+-------------------------------------------------------------| + | =-n= | Dry run | + |--------+-------------------------------------------------------------| + | =-f= | Force | + |--------+-------------------------------------------------------------| + * Troubleshooting ** Git commit hangs with no output