Skip to content

Commit cc65eb1

Browse files
Add technical guide for JULES visibility change (#623)
Co-authored-by: James Bruten <109733895+james-bruten-mo@users.noreply.github.com>
1 parent 2563492 commit cc65eb1

4 files changed

Lines changed: 69 additions & 27 deletions

File tree

source/FurtherDetails/change_notes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@
88

99
Recent Changes
1010
==============
11+
12+
01/05/26 - Advice on for JULES being switched to `public visibility <visibility_changes.html>`_

source/FurtherDetails/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ Further Details
2222
dos_donts
2323
fortitude_linter
2424
change_notes
25+
visibility_changes
2526
coding_style
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
.. -----------------------------------------------------------------------------
2+
(c) Crown copyright Met Office. All rights reserved.
3+
The file LICENCE, distributed with this code, contains details of the terms
4+
under which the code may be used.
5+
-----------------------------------------------------------------------------
6+
7+
.. _visibility_changes:
8+
9+
Changing Fork Visibility
10+
========================
11+
12+
Technical Guide: Re-linking to a Public Repository
13+
--------------------------------------------------
14+
15+
Once the repository is public, contributors must re-establish their forks to continue submitting pull requests.
16+
17+
#. Create a new public fork (you will need to delete or rename existing private fork)**
18+
1. Navigate to the now public repository
19+
2. Click the Fork button int the top-right corner to create a new fork under your account
20+
21+
#. Update Local Remotes
22+
In your existing local clone, you must update your remote URLs to point to
23+
the new public upstream and your new fork. Use the following commands:
24+
25+
.. code-block:: sh
26+
27+
# 1. Update the 'upstream' remote to point to the new public repository
28+
git remote set-url upstream git@github.com:MetOffice/<repo>
29+
# 2. Update your 'origin' remote to point to your NEW public fork
30+
git remote set-url origin git@github.com:<user>/<repo>
31+
# 3. Verify the changes
32+
git remote -v
33+
34+
#. Migrating unfinished work
35+
As existing PRs will be closed or disconnected,
36+
you will need to re-submit any open PRs from your new public fork.
37+
38+
The "detached" state is a security feature to isolate private forks when the
39+
upstream parent becomes public. Only GitHub staff have the administrative
40+
privileges required to manually re-link the repository network while
41+
preserving existing PR data and history.
42+
43+
One option is to make sure any work you wish to preserve is in a clone of your
44+
fork. Then recreate the fork from upstream using the same name as before.
45+
Pushing from your clone will connect to the new fork. However this will delete
46+
any pull requests you had open from the previous fork.
47+
48+
**Note:** If you already have a lots of develop branches/PRs, its probably best to
49+
contact `GitHub Support and Submit a ticket
50+
<https://support.github.com/contact?legacy&subject=Attach%20Fork&tags=rr-forks>`_
51+
to reattach your fork. Select your personal account from the drop down menu
52+
(as that is where your fork is, not the enterprise account) and use the
53+
following message:
54+
55+
My upstream private repo became public, which detached my fork. I have open
56+
PRs I need to preserve. Please reattach my fork to the original network.
57+
58+
Upstream URL: https://github.com/MetOffice/{repo-name}
59+
60+
Fork URL: https://github.com/{user}/{repo-name}
61+
62+
This process should usually get resolved within a day.

source/git_faq.rst

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -50,31 +50,8 @@ repositories public. We have a copy of the repository with all the previous
5050
releases internal to the MetOffice. Please ask if you need help accessing
5151
that.
5252

53-
.. rubric:: My forked repository got detached from upstream repository following
54-
visibility change (private to public) upstream.
53+
.. rubric:: My forked repository got detached from upstream following a visibility change
5554

56-
The "detached" state is a security feature to isolate private forks when the
57-
upstream parent becomes public. Only GitHub staff have the administrative
58-
privileges required to manually re-link the repository network while
59-
preserving existing PR data and history.
60-
61-
One option is to make sure any work you wish to preserve is in a clone of your
62-
fork. Then recreate the fork from upstream using the same name as before.
63-
Pushing from your clone will connect to the new fork. However this will delete
64-
any pull requests you had open from the previous fork.
65-
66-
If you already have a lots of develop branches/PRs, its probably best to
67-
contact `GitHub Support and Submit a ticket
68-
<https://support.github.com/contact?legacy&subject=Attach%20Fork&tags=rr-forks>`_
69-
to reattach your fork. Select your personal account from the drop down menu
70-
(as that is where your fork is, not the enterprise account) and use the
71-
following message:
72-
73-
My upstream private repo became public, which detached my fork. I have open
74-
PRs I need to preserve. Please reattach my fork to the original network.
75-
76-
Upstream URL: https://github.com/MetOffice/{repo-name}
77-
78-
Fork URL: https://github.com/{user}/{repo-name}
79-
80-
This process should usually get resolved within a day.
55+
For further details on how to migrate a detached fork after an upstream
56+
repository changes from private to public, see the :ref:`visibility_changes`
57+
guide.

0 commit comments

Comments
 (0)