Source Control
Source Control (GitHub) - User Manual
This guide provides step-by-step instructions for managing source control in cloud-based VS Code (code-server) using GitHub.
Prerequisites
Before using GitHub with Monaca, you must first link your Monaca account to GitHub.
1. Committing File Changes
Open the Source Control panel by clicking the Git icon in the Activity Bar (left sidebar).
Click Initialize Repository.

Enter a commit message (e.g.,
"init") and click Commit.

In the confirmation dialog, click Yes to commit all changes.

2. Publishing to a New GitHub Repository
Click Publish Branch to push the committed changes.

If this is your first time using GitHub in the IDE, a sign-in dialog will appear. Click Allow to proceed.

Copy the authentication code and click Copy & Continue to GitHub.

A new tab will open. Review your GitHub account details and click Continue.

Paste the copied authentication code and click Continue.

Review your GitHub account details and click Authorize Monaca to grant access.

Depending on your GitHub authentication settings, a different sign-in page may appear. Choose your preferred authentication method.

If using GitHub Mobile, open the GitHub app on your phone and enter the verification code.

Once authentication is successful, you will see a confirmation page. You can close this tab and return to the IDE.

The default repository name will be set to the Project ID.

You can keep the default name or change it. Select whether to create a private or public repository.

Once the repository is successfully created, you will see confirmation messages.
Click Open on GitHub to view the repository.
Click Yes to enable periodic syncing with the remote repository.

3. Publishing to an Existing GitHub Repository
Once the GitHub repository is linked to your project, you will not be required to authenticate again.
Make modifications to your project.

Enter a commit message describing the changes and click Commit.

Click Yes to confirm or Always to avoid this confirmation dialog in the future.

Click Sync Changes to push the latest commits to the remote repository.

Click OK to confirm or OK, Don't Show Again to disable this confirmation for future syncs.

Once the changes are successfully pushed, the commit list will be cleared, and the sync button will be disabled.

4. Additional Git Operations
Additional Git operations such as Pull, Stash, Branch Management, and more can be accessed by clicking the menu (hamburger icon) in the Source Control panel.

Notes
Ensure you have write access to the repository before committing changes.
Always pull the latest changes before making updates to prevent merge conflicts.
GitHub authentication steps may vary depending on user settings.
Some features may be restricted for free-plan users.
Private repositories are not available for free-plan users.
Last updated