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
- navigate to the root of your code
- run
git init
to initialized a git repository - connect the repository using
git remote add origin [email protected]:<USERNAME>/<REPOSITORY-NAME>
- run
git fetch
to fetch latest changes (this will not erase your changes) - 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