Add `git clean` notes to notes.org.
authorW. Trevor King <wking@drexel.edu>
Fri, 27 Jan 2012 18:00:25 +0000 (13:00 -0500)
committerW. Trevor King <wking@drexel.edu>
Fri, 27 Jan 2012 18:00:25 +0000 (13:00 -0500)
posts/Git/notes.org

index 6ec07a4451e4b0248f0dedfb671379c914c90022..3bff515987df4fd44758cca021c5bea064474bd5 100644 (file)
@@ -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