If you are wanting to contribute to the open soure repository but would rather create a fork, you will need to ensure that you are keeping your fork up to date with the latest changes so that pull requests are accurate to review and don't include changes that are already included into main
. Due to this scenario, it is important that your repository is kept up to date with the active changes happening on the arbor-protocol/ui
public repo. To get your forked repo up to date with those public changes, follow these steps:
-
Add a local upstream remote if you haven't already, and point it to the
arbor-protcol/ui
repo. You'll only need to do this once, initially.git remote add upstream https://github.com/arbor-protocol/ui.git
-
Doublecheck your local remotes with
git remote -v
. This should yield the following:origin https://github.com/your-account/your-fork.git (fetch) origin https://github.com/your-account/your-fork.git (push) upstream https://github.com/arbor-protocol/ui.git (fetch) upstream https://github.com/arbor-protocol/ui.git (push)
3.) Download all remote commits to your local repositories by running git fetch --all
-
Checkout
main
and ensure there are no pending changes and that your working tree is clean. Doublecheck withgit status
. It should yield the following:git checkout main git status On branch main Your branch is up to date with 'origin/main'. nothing to commit, working tree clean
-
Pull the latest version of the upstream interface repo into the
main
branch by setting theHEAD
to that of the upstream remote.git reset --hard upstream/main
-
Now that your local
main
branch mirrors the latest fromarbor-protocol/ui
, checkout thechore/sync
branch (or create one if you don't have it already). This is so we can prep the changes into a new PR.git checkout chore/sync
-
Merge in your local
main
into this branch. If there are conflicts, fix them locally andadd
then to the merge commit.git merge main
-
You should now have a pending commit to push up. Push it up to your fork.
git push origin chore/sync
-
Next, open up a new PR in your forked repository to merge
chore/sync
intomain
, or you can just do this locally if you prefer, which would likely be simpler. Manage any conflicts and complete the merge. -
At this point! Your forked repository
main
branch should be up to date with the latest changes fromarbor-protocol/ui/main
branch. Lastly, ensure thechore/sync
branch is not deleted so you can continue to use it in step 6 for future syncs without issue. Then get latest on your localmain
branch again, which should ideally pull one new commit but not have any changes since you already pulled them in step 5.git checkout main && git pull