How can I upload the Drupal code from the Marketplace install to a remote git repo?
Linode Linode Staff
I just created a Linode running Debian 10 using the Drupal Marketplace App. How can I upload the Drupal code from there to a remote git repo?
rl0nergan Linode Staff
You can follow the steps below to install git and get your Drupal installed uploaded to a remote git repo:
- Connect to your Linode as the root user either via SSH (recommended) or the Lish Console in Cloud Manager.
- Install git on your Linode by running:
apt update && apt install git -y
- Configure at the very least your username and email that matches what you're using on GitHub/GitLab/other by following the steps here.
- Change to the directory Drupal is installed and initial a local git repo by running:
cd /var/www/drupal && git init
- Create the repo on GitHub/GitLab/other, configure the remote repos locally, and push the files up. While the guide I included below if from Github, the same steps also apply to GitLab or any other remote repository setup:
This should get your Drupal code uploaded to a remote repository so you can begin working on it from other locations.