I'm not seeing the sync buttons on my forked repo

Brian_Walker July 3, 2023

I saw/used it once before.  I think it should show under Repository Details in upper right block under 'Fork of...'.  In the last hour, I merged changes into the main branch of the parent repository, but this button is not displaying.

Screenshot 2023-07-03 141510.png

3 answers

1 accepted

0 votes
Answer accepted
Brian_Walker July 7, 2023

@Patrik S I ran into this issue again today.  The sync button did not appear on the Source page, so I tried focusing on the branch page and the Sync bar was displayed, but when I hovered over it I got a permission denied error.  This is because we enabled branch restrictions on the main branch that prevents direct writes to the main branch.  Once added an exception to the branch restriction I could sync from either the Source or the branch view.

I think branch restrictions on the main branch are a common convention.  It might make sense to add an exception for this on the branch restrictions UI, specifically for forks that can sync from a parent repo.  Alternatively, you could show a message on the Source page as to why sync is disabled.

Have a good weekend.

0 votes
Brian_Walker July 5, 2023

@Patrik S Thank you for the response.  I searched repeatedly on both the Source and the branch pages.  As I mentioned, I have seen the Sync button on the Source page in the past, but this time I was not displaying (I checked over multiple hours and page reloads). 

I have since manually merged those changes from the parent repo so I can't show you but the next time I will submit a bug with the actual repo.  I'm pretty sure things were not working as designed.

Thanks again. 

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 4, 2023

Hello @Brian_Walker and thank you for reaching out to Community!

If you pushed new commits to the parent repository main branch, when accessing the fork repository a Sync button should indeed be shown in the side card named Repository details, which is located on the top right side of the page when you navigate the Source page of the repository, as in the image below :

Screenshot 2023-07-04 at 3.31.30 PM.png

By clicking on that Sync button, the main branch of the fork repo should be synchronized with the corresponding branch in the parent repo.

Another alternative to accessing the Sync option is by navigating to the Branches page, selecting the main branch, and comparing it to the parent's main branch, as shown below:

Screenshot 2023-07-04 at 3.33.04 PM.png

In both places, the Sync option will have the same result of synchronizing the fork's main branch with the parent main branch.

It's important to note that: 

  • Only the main branch of the repository is synced with your fork. No other branch changes will be detected or available to sync.

  • To sync branches that are not the main branch of the repository, you need to select the branch you want to sync as the main branch (Repository Settings >> Repository details >> Expand ADVANCED >> Main branch) on both the parent and forked repository. Once you do this the Sync button should be shown in the locations mentioned above.

Thank you, @Brian_Walker !

Patrik S

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events