How can I upload the Drupal code from the Marketplace install to a remote git repo?

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?

1 Reply

You can follow the steps below to install git and get your Drupal installed uploaded to a remote git repo:

  1. Connect to your Linode as the root user either via SSH (recommended) or the Lish Console in Cloud Manager.
  2. Install git on your Linode by running:
    • apt update && apt install git -y
  3. Configure at the very least your username and email that matches what you're using on GitHub/GitLab/other by following the steps here.
  4. Change to the directory Drupal is installed and initial a local git repo by running:
    • cd /var/www/drupal && git init
  5. 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.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct