Connect to an existing repository

Introduction

When your are working on plugins directly in the vendor folder you may not have the plugin initialized as a git repository.

Use this guide if you have an existing codebase which is not connected to its github repository.

This also works if you already made changes to your code.

Step-by-step guide

  1. navigate to the root of your code
  2. run git init to initialized a git repository
  3. connect the repository using git remote add origin [email protected]:<USERNAME>/<REPOSITORY-NAME>
  4. run git fetch to fetch latest changes (this will not erase your changes)
  5. execute git checkout -f main

If made some changes before, you should see them as normal using git status

Hint: if you messed anything up, just delete the .git folder and start over