<div dir="ltr">All,<div><br></div><div>A follow-up on this feature...some users are also using GitHub Actions (free) to set up similar syncing in their forks. Below is an example that Guoqing Ge at EMC has been using successfully, which I wanted to share with others:</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Github provides free "actions" so that we can let Github do the upstream sync fully automatically without the user's involvement. It may be useful for some group repos which need frequent sync. I set up an action at comgsi/GSI to sync its master branch with NOAA-EMC/GSI twice a day and it has been working very well for about a year now. </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The action code is simple and you may check them here:<br><a href="https://github.com/comgsi/GSI/blob/DTC/.github/workflows/syncEMC.yml">https://github.com/comgsi/GSI/blob/DTC/.github/workflows/syncEMC.yml</a></blockquote><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><font color="#000000"><br></font></div><div><font color="#000000">I have not extensively worked with Actions yet so users who want to explore them should refer to the GitHub documentation:</font></div><div><font color="#000000"><br></font></div><div><a href="https://github.com/features/actions">https://github.com/features/actions</a><font color="#000000"><br></font></div><div><a href="https://docs.github.com/en/actions">https://docs.github.com/en/actions</a><font color="#000000"><br></font></div><div><br></div><div>I encourage folks to share similar success stories and examples in their Slack or other similar discussion channels. Thanks!</div><div dir="ltr"><font color="#000000"><br></font></div><div dir="ltr"><font color="#000000">Kate Friedman (formerly Howard) (she/her)<br>NOAA/NWS/NCEP/EMC Engineering and Implementation Branch</font><br></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 19, 2021 at 12:18 PM Kate Friedman - NOAA Federal <<a href="mailto:Kate.Friedman@noaa.gov">Kate.Friedman@noaa.gov</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>All,</div><div><br></div><div>For those who have not yet noticed, there is a cool new feature in GitHub which helps you keep your fork branches up-to-date with the authoritative repository. The "Fetch upstream" dropdown (found under the big green "Code" button) allows you to either "Compare" (compare with upstream) or "Fetch and merge" (fetch upstream and merge into your fork) or "Open pull request". Below is a screenshot showing the popup after clicking on the "Fetch upstream" button in my fork of global-workflow. I already used the button to sync my fork's develop branch so there isn't anything to do anymore so the buttons are now disabled:</div><div><br></div><img src="cid:ii_kovn2ic60" alt="image.png" width="524" height="295"><div><br><div>It also works for branches other than the main develop branch. Here I show that my fork's operations branch is behind the auth repo copy and I can hit the green "Fetch and merge" button to update it automatically:<br></div><div><br></div><div><img src="cid:ii_kovn9qmb1" alt="image.png" width="524" height="295"><br><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><font color="#000000"><br></font></div><div><font color="#000000">If I am on a feature branch that doesn't exist in the auth repo then that "Fetch upstream" dropdown gives me the option to open a pull request for my branch and notes that conflicts exist (I will have to perform a sync merge manually first to resolve conflicts):</font></div><div><font color="#000000"><br></font></div><div><img src="cid:ii_kovnbdwi2" alt="image.png" width="524" height="295"><br></div><div dir="ltr"><font color="#000000"><br></font></div><div dir="ltr">It looks like conflicts will still have to be resolved manually but conflict-free merges can now be completed automatically with this feature.
So save yourself some time and try out this new feature! :)<font color="#000000"><br></font></div><div dir="ltr"><font color="#000000"><br></font></div><div dir="ltr"><font color="#000000">Kate Friedman (formerly Howard) (she/her)<br>NOAA/NWS/NCEP/EMC Engineering and Implementation Branch</font><br></div></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div>