How to work with GitHub

Creating app

To get started working with GitHub, you need first to create business software on the Flatlogic Platform.

Tap here and let’s go!

Working with GitHub

The ‘Login’ window opens next, where you need to enter login details for your GitHub account or sign in.

Next, the ‘Choose a name for your repository’ window opens, where you have to choose a name for your repository and select privacy terms.

After this step, the Flatlogic Bot creates a GitHub repository for you and uploads your code there. Afterward, you can work with the platform or with your GitHub repository.

Working with GitHub Branches

Also, you can make changes to your code in your GitHub repository. But make sure you’re working on the right branch.

GitHub is connected to Flatlogic hosting, all deployments go directly from there. There are two branches: master & generated. Master - is for you to make changes directly in the source code. Generated is for Flatlogic Bot to make changes to the generated code. You can initiate a Flatlogic Bot commit by pressing on push to GitHub button after making changes to the app. After this, you need to create a pull request and merge generated branch into the master. It is better not to work with the Generated branch and leave it to Flatlogic Bot.

Generated Branch

After every change, you have made to your project on the Settings tab you can initiate a push to GitHub. Flatlogic bot will push changes to the Generated Branch.

Next, you need to create a pull request and merge the changes in both branches with a click on ‘Compare & Pull request’.

Master Branch

All customizations you wanted to add you should do at the Master branch on GitHub. To open your application with the changes you made on GitHub, you should go to your project page at Flatlogic Platform, to the Settings tab, and click on “Deploy From GitHub”. It will regenerate your application.

Working with IDE

To clone your project to your IDE, click on the green button Code and the pop-up menu click on or copy the link near this button.

Next, go to your IDE and on the starter page click on Clone Git Repository…

Paste the copied Git Repository and Enter.

Next, you will see the pop-up ‘Would you like to open the cloned repository?’, please, choose how would you like to open your project.

After you have made your custom changes, they will be displayed on the left menu at the Source Control tab.

There are two ways to push your custom code to GitHub.

1. Using the Source Control tab.

You need to add all your changes, write the message about what you’ve done or what you added accept it also and sync all changes.

2. Using the terminal.

git add . - to make all modified files ready for commit.

git commit -m "[descriptive message]" – record the changes with the specified message.

git push – push the current branch into the remote branch.

Next, go back to your project page at Flatlogic Platform, go to the Settings tab and click on “Deploy From GitHub”. It will regenerate your application.

            How to create React-NodeJS(TypeORM)-PostgreSQL App →