Repository navigation
Adding upstream repo to my fork question #552
|
Hello, I am following the getting started for lfric_apps (from lfric_core.). In the section "Maintaining forks" it shows how to add an upstream repo to my existing clone. I have done this while the branch I am developing is live. Does it matter and , if not, could that reassurance be added to the page? It might be that I do not need the upstream for this exercise but in the long run I'd like to understand the processes. Page I am reading is https://metoffice.github.io/simulation-systems/WorkingPractices/maintaining_forks.html |
Replies: 2 comments 1 reply
|
Hi Mark Richardson (@MarkUoLeeds), Thanks for your question, adding an upstream repository while developing on a live branch of your fork is fine Best, |
|
Hi Mark Richardson (@MarkUoLeeds) The short answer is: Adding an upstream remote (MetOffice/{repo}) to your local clone while you're actively developing on a branch is safe. It only records another repository URL in your local Git config; it does not touch your working tree, index, or current branch. Nothing changes until you explicitly fetch from that remote and then merge or rebase those fetched commits. For the Simulation Systems workflow specifically, syncing your fork is done per branch, and it's common to sync both If you decide you don't need the upstream remote, you can remove or rename it: git remote remove upstream # remove
# or
git remote rename upstream metoffice-upstream # rename for clarityIn summary, adding the upstream remote while your branch is live doesn’t affect your development branch. The only time your branch changes is when you choose to merge or rebase with content fetched from upstream. Hope that helps. |
Hi Mark Richardson (@MarkUoLeeds)
The short answer is: Adding an upstream remote (MetOffice/{repo}) to your local clone while you're actively developing on a branch is safe. It only records another repository URL in your local Git config; it does not touch your working tree, index, or current branch. Nothing changes until you explicitly fetch from that remote and then merge or rebase those fetched commits.
For the Simulation Systems workflow specifically, syncing your fork is done per branch, and it's common to sync both
stableandmainaround a release. The web UI's Sync fork button updates the remote fork, while Git commands update your local clone; you can use either depending on what …