From ca768b576ae44d105fd0cd4bfff070f67bf150af Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 27 Jan 2012 13:00:25 -0500 Subject: [PATCH] Add `git clean` notes to notes.org. --- posts/Git/notes.org | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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 -- 2.26.2