Git makes it super easy to keep your own fork up-to-date with it’s upstream source.
DO NOT keep downloading files you think have changed and copying them over manually, this is both cumbersome, unnecessary, and error-prone.
Option 1: GitHub (Fork to a public Repo)
NB: Unfortunately there’s no way to fork to a private repo in GitHub. This meas you should either use banana’s build-args from the dashboard for your API keys, or choose a different method below.
- Fork the repo
and then
(Uncheck “Copy the main
branch only” if you want access to other branches too).
- To keep it up-to-date, go to YOUR FORK’s page on github:
You can compare the changes (if you want) or simply click Update branch, and with just that one click, you get:
You can now git pull
locally to pull in the merged changes from (your) github repo.
Option 2: Command line
# Do this once to add the upstream repo as a "remote"
$ git remote add upstream git@github.com:kiri-art/docker-diffusers-api.git
# Fetch upstream's latest updates (of all branches)
$ git fetch upstream
# Merge the updated code into your fork
$ git merge upstream/main # or upstream/dev, etc.
Option 3: Bare Clone / Mirror Push
See this post below, with big thanks to @Klaudioz.
Notes
Please ask below if anything is not clear, or if you have suggestions to improve this for others.