Skip to content

Commit

Permalink
Add explicit bareRepository configuration when pushing bare mirror
Browse files Browse the repository at this point in the history
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 '<path>.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 <[email protected]>
  • Loading branch information
jdknight authored Nov 19, 2024
1 parent 15926e6 commit 8c1ceaf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 8c1ceaf

Please sign in to comment.