From 8c1ceaf3e99f8482f8ec3def5909b4b4b8c74c8b Mon Sep 17 00:00:00 2001 From: James Knight Date: Mon, 18 Nov 2024 21:44:32 -0500 Subject: [PATCH] Add explicit bareRepository configuration when pushing bare mirror If a user has configured `bareRepository=explicit` in their configuration, the push operation in this example will fail with the message: fatal: cannot use bare repository '.git' (safe.bareRepository is 'explicit') By adding `-c "safe.bareRepository=all"` to the default instruction set, this should prevent issues for users who have bareRepository configured. Signed-off-by: James Knight --- .../working-with-forks/detaching-a-fork.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/pull-requests/collaborating-with-pull-requests/working-with-forks/detaching-a-fork.md b/content/pull-requests/collaborating-with-pull-requests/working-with-forks/detaching-a-fork.md index c90c21e04037..3f41d1f4a44a 100644 --- a/content/pull-requests/collaborating-with-pull-requests/working-with-forks/detaching-a-fork.md +++ b/content/pull-requests/collaborating-with-pull-requests/working-with-forks/detaching-a-fork.md @@ -48,7 +48,7 @@ You can delete a fork and recreate the same repository, without the connection t ```shell cd FORK-NAME.git - git push --mirror https://github.com/EXAMPLE-USER/FORK-NAME.git + git -c "safe.bareRepository=all" push --mirror https://github.com/EXAMPLE-USER/FORK-NAME.git ``` 1. Remove temporary local clone you created earlier.