Alan IDE:
version control
& offline editing

  1. Introduction
  2. Generate an SSH key
  3. Git hosting provider
  4. Files to Git
  5. Working locally
  6. Collaborating with others

Introduction

This guide explains how to set up version control with Git for Alan IDE projects. It also explains how to collaborate with others using an existing Git repository. If you do not know what version control is, we encourage you to just use the online Alan IDE and skip this guide.

If you are comfortable using Git and want to use your own editor/develop when offline, please follow the instructions from this guide.

Generate an SSH key

Generate an SSH key for the Alan IDE. We recommend that you do not use your own private key, but generate one instead as shown below. For details on SSH, see this guide.

Git hosting provider

Now, head to GitHub or another hosting provider for Git.

Files to Git

Go back to the online IDE. Run these commands from the Terminal:

git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git init
git add .
git commit -m "first commit"
git remote add origin git@github.com:<username>/my-alan-project.git
git push

Working locally

Now you can clone the repository on your local machine:

git clone git@github.com:<username>/my-alan-project.git

VS Code users can find the Alan extension here. Emacs users can find AlanForEmacs here.

Please note that for deploying your Alan project (Alan Deploy), you will still need the online environment (Alan IDE). If you want/need to be able to deploy locally, please request this on the forum or send us an email. If we receive a significant number of requests, we will add a guide for local deployments.

Collaborating with others

You can collaborate with others using an existing Git repository by following the steps below.

git config --global user.email "you@example.com"
git config --global user.name "Your Name"
cd ~/project
git init .

# commit your own project
git checkout -b my-own-branch
git add .
git commit . -m "own initial commit"

# add remote repository
git remote add origin git@github.com:<username>/my-alan-project.git
git fetch origin
git checkout master # or other branch from teammate

* Deployments are your own: ./deployments/*/deployment.alan files contain your Alan app url/ide name. If you overwrite your deployments with those of someone else, you need to update your deployment.alan files. You can do that by replacing all occurences of the <name-of-someone-else> with <your-ide-name>.