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 '<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 <git@jdknight.me>
This commit is contained in:
James Knight 2024-11-18 21:44:32 -05:00 коммит произвёл GitHub
Родитель 15926e697b
Коммит 8c1ceaf3e9
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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.