How to save your application in git¶
When you design your application, you can push changes to and pull from a remote Git repository:
1. How to push to a remote Git repository¶
1.1. Create a new Github repository¶
Go to Github and create a new repository (e.g.,
test-git
):

Figure 1. Create a new git repo¶
Leave the options Add a README file
and Add .gitignore
unchecked. Otherwise, you will have a conflict error when Cloud Create pushes to the repository the first time.
1.2. Create a Github access token (if you don't have one)¶
Go to Settings / Developer Settings / Personal Access Tokens / Tokens (classic)
Choose
Write:packages
andDelete:packages
.Backup the token.

Figure 2. Create a personal access token with write and delete permissions¶
1.3. Design & push¶
Design and Save Application.
In the design editor, click Git configuration

Figure 3. Config git url¶
And set the git url (e.g.,
https://github.com/trihoangvo/test-git.git
).

Figure 4. Set git url¶
- Choose Push:
Type the branch name (e.g., main for Github, master for Gitlab).
Specify the Github access token / Gitlab password in the password field.

Figure 5. Push to git¶
We never save your access token or password so you have to input it everytime.
Expected result¶
Your design is pushed to git in the given branch (e.g., main
):

Figure 6. Result of git push¶
If there is a conflict, git will push to a new branch starting with
conflicts-*
2. How to pull changes to your application¶
Clone your git repository (e.g.,
git clone git@github.com:trihoangvo/test-git.git
)Create a new file (e.g.,
my_script.sh
) in your local git:

Figure 7. Git create new file¶
Push the new file to your remote git:
git add my_script.sh
git commit -m "Add my script"
git push origin main
Click Pull to update your application:

Figure 8. Pull changes from git¶
Expected result¶
The new file my_script.sh
shows up in the editor under Active content:

Figure 9. Result of git pull¶
Repository size limit: The pulled remote repository is not allowed to be bigger than 20 Mb.