Git Sync
Learn how to handle Git sync messages in your Coalesce App.
Unable to Update Branch out of Sync
This error is usually caused by changes being made off platform. To prevent sync errors, we recommend periodically updating your local copy by:
- Always checking out the latest version of a branch to work from.
- Periodically fetching the repo.
- Doing frequent commits.
You can solve it by either discarding your changes or creating a new branch to keep your work.
Discard All Changes and Update
This will delete any changes you’ve worked on and update your branch to match remote.
Create a New Branch To Keep Work
You can create a new branch to hold your changes, then merge the new branch into the synced branch.
Let’s review the example, you’ll be walking through. You made a change locally, in this case, the description of the node CUSTOMER_VIEW
was changed to Coalesce App.
The remote has the same node, but the description was changed to GitHub description
. In the app, the branch is called main
.
Step 1: Create a New Branch
If you try to merge these changes, you’ll get the error message: Unable to Update Branch out of Sync.
-
While in the modal, click the Branches tab. The Unable to Update Branch out of Sync will disappear and you’ll be on the Branches tab.
-
Create a new branch from the commit you are working on. In this example, the commit is
GitHub Customer View Node Desc Change
. The new branch in this example is namedsave_uncommited_changes
. -
You’ll get a new message that says: The branch
save_uncommited_changes
that's attached to this workspace is out of sync. Certain actions are unavailable until the current branch is synced with the latest version. Go to the Commit tab to sync the branch. -
Click on the Commit tab. The branch is now
save_uncommited_changes
. You have a new message advising your branch is out of sync. Click Update Branch.
Step 2: Commit Your New Branch
-
After creating a new branch to save your changes and then updating, now you’ll commit your changes.
-
Still on the Commit tab, review your changes and commit. In this example, you can see that the description that was changed locally is being committed to the new branch
save_uncommited_changes
. The commit message ischanged description.
-
Go back to the Branches tab and switch to the
main
branch. Click Check Out Latest. This will pull the changes from the remote main to your local main branch. -
Refresh your page. This is important to make sure that the changes from main are applied in the Coalesce app. Your changes are still saved on the new branch you created. Review the changes to be sure. You are looking for the description from main, in this example it’s
GitHub description.
You need to refresh to make sure the changes from main are applied correctly.
Step 3: Merge Your Branch
The branch that holds the uncommitted changes needs to be merged into main. In this example it’s save_commited_changes
.
-
Go back to the Branches tab and switch to the
main
branch if you already aren’t on main. -
In the dropdown select the
save_uncommited_changes
branch. -
Select Merge next to your commit that saved the change. In this example, it was
changed description
. -
If you only had a few changes, then you’ll be presented with a Merge Conflict screen. Accept your changes. In this example, click Accept Incoming to accept the description change to the node. We are using Accept Incoming because the branch we saved the changes to is incoming to the main branch. If you have too many conflicts, you’ll need to resolve them outside of Coalesce. Review our Merge Conflicts documentation.
-
Your saved changes were merged into main. Refresh the app to see your changes.
Branch Out of Sync
This can happen if changes were made to the branch outside of Coalesce. Update the branch with the remote changes. If it can’t update, you’ll be able to pick the changes to keep using the Merge Conflicts processes.