Skip to content

Commit

Permalink
Add explicit bareRepository configuration when pushing bare mirror (g…
Browse files Browse the repository at this point in the history
…ithub#35338)

Signed-off-by: James Knight <[email protected]>
Co-authored-by: Alex Nguyen <[email protected]>
  • Loading branch information
jdknight and nguyenalex836 authored Dec 17, 2024
1 parent 1ab5dab commit 1367c2f
Showing 1 changed file with 3 additions and 5 deletions.
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.

0 comments on commit 1367c2f

Please sign in to comment.