# [PATCH] Documentation/git-clean.txt: document that -f may need to be given twice

4 messages from 2015-02-26 to 2015-02-26. Participants: Mikko Rapeli.
Thread: https://gitlist.dev/t/38656

## Mikko Rapeli, 2015-02-26 12:56

Subject: [PATCH] Documentation/git-clean.txt: document that -f may need to be given twice
Message-ID: <1424955400-13897-1-git-send-email-mikko.rapeli@iki.fi>
URL: https://gitlist.dev/e/1424955400-13897-1-git-send-email-mikko.rapeli%40iki.fi

```
This is needed in build automation where the tree really needs to
be reset to known state.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 Documentation/git-clean.txt |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt
index 94b6d19..872ab45 100644
--- a/Documentation/git-clean.txt
+++ b/Documentation/git-clean.txt
@@ -34,8 +34,12 @@ OPTIONS
 -f::
 --force::
 	If the Git configuration variable clean.requireForce is not set
-	to false, 'git clean' will refuse to run unless given -f, -n or
-	-i.
+	to false, 'git clean' will refuse to delete files or directories
+	unless given -f, -n or -i. Git will refuse to delete directories
+	with .git sub directory or file unless a second -f
+	is given. This affects also git submodules where the storage area of
+	of the removed submodule under .git/modules/ is not removed until
+	-f is give twice.
 
 -i::
 --interactive::
-- 
1.7.10.4

```

## Mikko Rapeli, 2015-02-26 12:58

Subject: [PATCH] Documentation/git-clean.txt: document that -f may need to be given twice
Message-ID: <1424955521-951-1-git-send-email-mikko.rapeli@iki.fi>
URL: https://gitlist.dev/e/1424955521-951-1-git-send-email-mikko.rapeli%40iki.fi
In-Reply-To: <1424955400-13897-1-git-send-email-mikko.rapeli@iki.fi>

```
This is needed in build automation where the tree really needs to
be reset to known state.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 Documentation/git-clean.txt |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt
index 94b6d19..bd4e93d 100644
--- a/Documentation/git-clean.txt
+++ b/Documentation/git-clean.txt
@@ -34,8 +34,12 @@ OPTIONS
 -f::
 --force::
 	If the Git configuration variable clean.requireForce is not set
-	to false, 'git clean' will refuse to run unless given -f, -n or
-	-i.
+	to false, 'git clean' will refuse to delete files or directories
+	unless given -f, -n or -i. Git will refuse to delete directories
+	with .git sub directory or file unless a second -f
+	is given. This affects also git submodules where the storage area
+	of the removed submodule under .git/modules/ is not removed until
+	-f is give twice.
 
 -i::
 --interactive::
-- 
1.7.10.4

```

## Mikko Rapeli, 2015-02-26 12:59

Subject: Re: [PATCH] Documentation/git-clean.txt: document that -f may need to be given twice
Message-ID: <20150226125941.GJ12550@lakka.kapsi.fi>
URL: https://gitlist.dev/e/20150226125941.GJ12550%40lakka.kapsi.fi
In-Reply-To: <1424955400-13897-1-git-send-email-mikko.rapeli@iki.fi>

```
On Thu, Feb 26, 2015 at 02:56:40PM +0200, Mikko Rapeli wrote:
> This is needed in build automation where the tree really needs to
> be reset to known state.
> 
> Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
> ---
>  Documentation/git-clean.txt |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt
> index 94b6d19..872ab45 100644
> --- a/Documentation/git-clean.txt
> +++ b/Documentation/git-clean.txt
> @@ -34,8 +34,12 @@ OPTIONS
>  -f::
>  --force::
>  	If the Git configuration variable clean.requireForce is not set
> -	to false, 'git clean' will refuse to run unless given -f, -n or
> -	-i.
> +	to false, 'git clean' will refuse to delete files or directories
> +	unless given -f, -n or -i. Git will refuse to delete directories
> +	with .git sub directory or file unless a second -f
> +	is given. This affects also git submodules where the storage area of

Oops, "of" is here twice.

> +	of the removed submodule under .git/modules/ is not removed until
> +	-f is give twice.
>  
>  -i::
>  --interactive::
> -- 
> 1.7.10.4
> 

```

## Mikko Rapeli, 2015-02-26 13:16

Subject: [PATCH] Documentation/git-clean.txt: document that -f may need to be given twice
Message-ID: <1424956610-4951-1-git-send-email-mikko.rapeli@iki.fi>
URL: https://gitlist.dev/e/1424956610-4951-1-git-send-email-mikko.rapeli%40iki.fi
In-Reply-To: <1424955521-951-1-git-send-email-mikko.rapeli@iki.fi>

```
This is needed in build automation where the tree really needs to
be reset to known state.

Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
---
 Documentation/git-clean.txt |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-clean.txt b/Documentation/git-clean.txt
index 94b6d19..641681f 100644
--- a/Documentation/git-clean.txt
+++ b/Documentation/git-clean.txt
@@ -34,8 +34,12 @@ OPTIONS
 -f::
 --force::
 	If the Git configuration variable clean.requireForce is not set
-	to false, 'git clean' will refuse to run unless given -f, -n or
-	-i.
+	to false, 'git clean' will refuse to delete files or directories
+	unless given -f, -n or -i. Git will refuse to delete directories
+	with .git sub directory or file unless a second -f
+	is given. This affects also git submodules where the storage area
+	of the removed submodule under .git/modules/ is not removed until
+	-f is given twice.
 
 -i::
 --interactive::
-- 
1.7.10.4

```
