From d7fa0ddd78af3b67b9f2c0612dfc8c27e53a7e0c 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 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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..7b292dc78b13 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 @@ -35,7 +35,7 @@ You can delete a fork and recreate the same repository, without the connection t 1. Create a bare clone of the fork. ```shell - git clone --bare https://{% data variables.product.product_url %}/EXAMPLE-USER/FORK-NAME.git + git clone --bare https://{% data variables.product.product_url %}/EXAMPLE-USER/FORK.git ``` 1. Delete the forked repository. For more information, see "[AUTOTITLE](/repositories/creating-and-managing-repositories/deleting-a-repository)."

@@ -47,15 +47,13 @@ You can delete a fork and recreate the same repository, without the connection t 1. Mirror-push the repository back to the same remote URL. ```shell - cd FORK-NAME.git - git push --mirror https://github.com/EXAMPLE-USER/FORK-NAME.git + git --git-dir FORK.git push --mirror https://{% data variables.product.product_url %}/EXAMPLE-USER/FORK.git ``` 1. Remove temporary local clone you created earlier. ```shell - cd .. - rm -rf FORK-NAME.git + rm -rf FORK.git ``` For more information, see [our support page](https://support.github.com/request/fork) on forks.