Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add explicit bareRepository configuration when pushing bare mirror #35338

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)."<br><br>
Expand All @@ -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.
Loading