Projects

Version Control

Introduction

Version control is the practice of tracking and managing changes to code files. By using version control, you can save an extra back up of your project files in the cloud, keep a history of all code changes, and easily revert changes to your projects.

Create Workspace Repositories

Follow these steps to set up a new version control repository for one of your organization workspaces:

  1. In your version control system, create a new repository for the organization workspace.
  2. Open a terminal in your organization workspace and then clone the new repository to a temporary directory.
  3. $ git clone https://github.com/<userName>/<repoName>.git temp
  4. Move the .git directory from the temporary directory to the workspace directory.
  5. $ mv temp/.git <workspaceDirectory>/.git
  6. Delete the temporary directory.
  7. $ rm -r temp

Push Changes to Git

Follow these steps to push the changes of your organization workspace to your version control system:

  1. Pull all your cloud projects, creating directories where necessary.
  2. $ lean cloud pull
  3. Add the project directories and the Library.
  4. $ git add Library/
    $ git add <projectDirectory1>/
    $ git add <projectDirectory2>/
  5. Commit the changes.
  6. $ git commit -am "Latest Updates"
  7. Push the changes to the repository.
  8. $ git push

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: