How to upgrade Fluxstore projects using Git

inspireui
7 min readJun 11, 2020

In this guide, we will explain how to use the Git repo to manage your source code and easily update the source when a new version release, without losing your previous customization.

⚠️ Update: 15 June 2022
- Since 01 July 2022, Gitlab will not offer free access for above 5 users so we will stop sharing the Git repo, please follow this guide to merge the source (apply Regular License).
- The Extend License could send the request to access the advance source via ticket support https://support.inspireui.com

1. Video guide

This tutorial comes with the following video, skip this part if you would like to dive into a detailed explanation.

2. Detailed Instruction

Important: Please note that depending on the project that you have purchased the Git Repository URL could be different. For example, you will get the invite to access https://gitlab.com/inspireui/fluxstore-woocommerce if purchase the Fluxstore WooCommerce, or https://gitlab.com/inspireui/fluxstore-pro if purchased the Fluxstore Pro.

The tutorial on this guide will use the Fluxstore Pro (fluxstore-pro) repository as default.

Step 1: Fork the Gitlab repository

  • Click the Fork button to fork the sharing FluxStore-Pro repo to your own private Fluxstore repo (make sure to clone to your own private repo to protect your customization and API key, we have some Users commit and push their credential and source on the sharing InspireUI repo 😅)
  • Select a namespace to fork the project
  • Wait for the fork process to complete.
  • Now, this repository is a private repo that could only be seen by you.
  • Clone the source from your Fork repository.

Step 2: Install and Manage source with SourceTree

  • Visit the following website to download SourceTree: https://www.sourcetreeapp.com/
  • Once the download is completed, open the installation file and start installing SourceTree
  • Click “I agree to the Atlassian Customer Agreement” and “Continue” to install SourceTree
  • Click “Use an existing account” to continue.
  • If you have an account, log in with your account. If you do not have an account, you can sign in with google.
  • Skip the Setup. We will set up an account in a later step.
  • Drag your project folder to the SourceTree (or you can choose a folder)
  • Double click your project on the SourceTree.
  • Insert your Gitlab account information and select OK.
  • Double click your project on the SourceTree again to open your Git Repository.
  • Now try changing something in your project and commit them to git.

For example, I will change my version code project.

Re-open SourceTree, click on the “Commit” button in the upper left corner.

  • If this is the first time you use the SourceTree, it may require you to enter your GitLab email for the repo.
  • Now write a description for the commit and press the Commit button.
  • Press push to update the changes to your Gitlab repository.
  • After that, access your project via the GitLab website to check the changes.

Step 3. Update code from Repo Fluxstore-Pro to your repo project.

  • This is an important step to pull the latest source from the sharing Fluxstore repo.
  • Open the terminal in your project by opening SourceTree and pressing “Terminal” in the upper right corner.
  • If the SourceTree Terminal somehow does not work, you could use Mac’s Terminal or Windows Command-Line from outside. Remember to run it in your project folder and make sure Git is already installed on your system.
  • Then, run these commands below. It helps you to get the latest updates from our source.
  • Important: Please note that the Git repository will be different for every project you have purchased from InspireUI, for example: if you have got the access to FluxStore Pro, the link should be similar to https://gitlab.com/inspireui/fluxstore-pro.gitand the script is:
git remote add upstream https://gitlab.com/inspireui/fluxstore-progit fetch upstream
  • Then, you can use either the terminal or the SourceTree to pull the changes to your repository.
  • If you decide to use the terminal, insert this command
git pull upstream
  • If you decide to use SourceTree, select the Pull button on SourceTree
Use the interface from Source Tree
  • Here is what it looks like after pulling is completed.
  • Now you can merge the code from FluxStore-Pro to your project.
  • Right-click on the commit you want to merge, select Merge...
  • Uncheck Commit merged changes immediately if you are not sure about the changes. Otherwise, leave it and click OK.
  • Press the push button to finish this step.

Step 4: Some useful notes

  • In some cases, your changes are different from the changes in FluxStore-Pro. The SourceTree will inform you of a conflict when you pull the merged code from FluxStore-Pro.
  • Click OK to continue
  • Back to SourceTree, press “Commit” to see the changes.
  • As the shown image below, the conflict is caused by the FluxStore-Pro import code. To solve this, open your project with Visual Studio Code.
  • Since you have merged the changes from FluxStore-Pro to your project, “Accept Current Change” refers to your code, and “Accept Coming Change” is the code of FluxStore-Pro that causes the conflict.
  • In this case, you want to keep our code. So you will choose “Accept Current Change”. Conversely, if you want to get the FluxStore-Pro code, select “Accept Coming Change”.
  • Remember to review and rebuild the code after completing solving the conflict to ensure that your source code commits are not going to fail.
  • Return to SourceTree and click Commit when done.
  • Push code

That’s all for now. Let us know if you have any question 😊

--

--

inspireui

Elegant Flutter Mobile App Templates for your Websites