Code App
  • Code App Documentation
  • Guides
    • Getting familiar
    • Your first program in Python
    • Creating a Node.js project
    • Version Control
    • Connecting to a remote server (SSH/FTP)
  • Extras
    • Building Code from source
    • Frequently Asked Questions
    • Supported Languages
Powered by GitBook
On this page
  • Set up your identities
  • Set up your credentials
  • Cloning a repository
  • Committing files
  • Pushing to remote
  • Branches and tags
  • Pull and Fetch
  1. Guides

Version Control

Use the built-in support for Git to manage your code.

PreviousCreating a Node.js projectNextConnecting to a remote server (SSH/FTP)

Last updated 11 months ago

Command line git is unavailble because of a licensing issue. Use lg2 or the GUI instead.

Set up your identities

Git uses name and email address identify the author of each commit. Before making a commit, you'll need to set up your identity.

To proceed, go Settings > Version Control > Identity.

Set up your credentials

If you are cloning a private repository or pushing changes to a remote, you'll need to set up credentials. To start, enter your credentials at Settings > Version Control > Authentication.

Password-based Authentication

The easiest way to authenticate in Git is to use password-based authentication. To start, obtain a personal access token from your Git hosting provider. To learn more:

Key-based Authentication

SSH keys can also be used to authenicate in Git. To start, generate a SSH key pair and configure them in your Git hosting provider. To learn more:

Setting up multiple credentials

Code App supports multiple credentials. You can configure a unique credential for each hosting provider by specifying their hostnames during the setup process.

Cloning a repository

To clone a repository, tap the source control icon in the sidebar and enter its url in the clone repository section. Assign it as the workspace folder by tapping the open folder button.

Workspace folder is the folder the editor currently loaded. To work with a git repository, it must be located at the root of the workspace folder. You can load a folder by holding a folder cell in explorer or by using the code command in the terminal.

Community Templates

A list of community-maintained projects for Code App can be found and cloned under the community templates section.

Committing files

Newly added / modified files must be added to the staging area before you can make a commit. To do this, press the plus icon next to the file name.

You can now enter a commit message in the textfield and press the commit button to commit. You can also use the command+enter shortcut.

Pushing to remote

You can push your changes to your hosting provider like GitHub.

Branches and tags

To checkout a branch or a tag, tap the branch icon located in the bottom left corner and select one.

Pull and Fetch

You can also pull or fetch changes from remote. Pull immediately applies the upstream changes to your files. It does so by fast-forwarding the upstream commits if possible or attempting to merge otherwise. On the other hand, fetch does not write changes to your files.

To learn more about git pull and fetch:

Creating a personal access token - GitHub DocsGitHub Docs
Creating a personal access token on GitHub
Personal access tokens | GitLab
Creating a personal access tokeno on GitLab
Connecting to GitHub with SSH - GitHub DocsGitHub Docs
Connecting to GitHub with SSH keys
Use SSH keys to communicate with GitLab | GitLab
Connecting to GitLab with SSH keys
Git - git-pull Documentation
Logo
Git - git-fetch Documentation
Logo
Logo
Hostname-based credentials
Cloning a repository
Adding a file to staging area
Pushing changes to remote
Checkout to a branch
Pull from a remote
Logo
Logo
Logo