From 0f172b5c618c946c659702659a48537f1a8c34e1 Mon Sep 17 00:00:00 2001 From: Niccolo Borgioli Date: Tue, 5 Mar 2024 17:27:27 +0100 Subject: [PATCH] add git clean --- pages/git/clean.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 pages/git/clean.md diff --git a/pages/git/clean.md b/pages/git/clean.md new file mode 100644 index 0000000..fd96c9c --- /dev/null +++ b/pages/git/clean.md @@ -0,0 +1,17 @@ +--- +tags: + - git + - clean + - gitignore + - delete +--- + +# Delete all files mentioned by `.gitignore` + +This command is useful if you want to reset a repository to it's checked out state. + +```bash +git clean -Xdf +``` + +[Original SO Link](https://unix.stackexchange.com/a/542735)