Syncing Updates in StartupBolt
Many of our customers have asked about the best way to sync updates to their existing projects. We've developed a systematic approach and best practices to handle this efficiently.
You can watch the video tutorial below or read the documentation under the video.
Existing Project Updates
StartupBolt comes with a .git
folder containing git history. If you already have a project and want to upgrade to the latest version of StartupBolt, follow these steps:
- Download and Unzip the Latest Version: Download the latest zip and unzip it to a separate folder
- Navigate to Your Existing Project: On macOS or Linux, open the Terminal. On Windows, open PowerShell or Command Prompt, and navigate to your existing project folder using the following command:
cd /path/to/your/existing/project
- Run the Following Commands in Your Project Folder: Inside your existing project folder, run the following commands:
git remote add upstream ../new-version
Replace new-version
with the path and name of the folder where you unzipped the new version. Then, execute the commands below:
git fetch upstream
git merge upstream/master
git remote remove upstream
This process merges the new version into your existing project
Handling Conflicts
To minimize and handle conflicts effectively, we recommend following these best practices:
Module Management
- Use props whenever possible - StartupBolt modules accept props to change colors, texts, images, etc., without editing the code directly
- Avoid editing prebuilt modules in
/modules/native
and/modules/shadcn
as we regularly improve these - For custom modifications, copy modules to
/modules/custom
and edit them there - this directory won't face conflicts
Utility Functions
- Avoid editing core utilities in
/utils
- Create new utilities in
/utils/custom
to prevent conflicts - Remember that core utilities are essential for StartupBolt's functionality and may be updated in new releases
Page and Layout Files
- Most conflicts occur in root layout, root page, private layout, and private page files
- New pages you create won't typically face conflicts
- When conflicts arise, review the diffs carefully before merging
- Understanding git merge strategies will help resolve conflicts smoothly
Using Changelogs
For clarity during the merge process, refer to our version changelogs available in the dashboard next to the download button. These logs detail specific file and line changes to guide you through conflict resolution.
Conclusion
By following these guidelines and best practices, you can efficiently manage updates to your StartupBolt project while minimizing conflicts. The combination of proper module management, utility organization, and careful attention to core files ensures a smooth update process.