Syncing Fork
Since the ai-accelerator project https://github.com/redhat-ai-services/ai-accelerator is an active project and we make changes to it. The forked project needs to be synced to get the latest updates. To do this, go to your forked project (https://github.com/your_username/ai-accelerator) and look to see if your branch is behind on commits.

This means that your forked project does not have the latest changes and is behind in commits.
To sync and get the latest changes, click the Sync fork
button and it should expand telling you that “This branch is out-of-date”. Click the green “Update branch” button and your forked project should have the latest changes.
![[width=35%]](_images/sync_dropdown.png)
After your branch syncs with the upstream project, you should have the latest changes. You can check to see if your branch is up-to-date by looking at the commit history. If you see that your branch is up-to-date, then you have successfully synced your forked project with the upstream project.

If you click the “Discard X commits”, this will discard your changes and update your forked project to mirror exactly the upstream project. You will lose your changes.
If you get a conflict when updating/syncing your fork, it will make you discard your changes. If you do not want to lose your changes do not discard your changes. Instead, create a new branch with the base branch being that which has your changes (main branch). This will create a new branch with your changes and should be exactly the same as the original branch (main). Then you can discard your changes in the main branch, update/sync fork (to get the latest updates), then you will need to open a PR request to merge your branch (with your changes) to the main branch (now updated/synced). This will allow you to have your changes as well as having the updates from the upstream project.
You may have to deal with manually fixing the merge conflicts when syncing. |