# Committing Bedrock to GitLab Server for the First Time

**URL:** https://discourse.roots.io/t/committing-bedrock-to-gitlab-server-for-the-first-time/9223
**Category:** bedrock
**Created:** 2017-03-27T23:42:36Z
**Posts:** 9

## Post 1 by @s3w47m88 — 2017-03-27T23:42:36Z

I realized I haven’t committed my work to it’s git repo on my private gitlab server. I’m wondering what the process is for this as I have ~/Sites/myproject/trellis and ~/Sites/myproject/site.

Am I suppose to make ~/Sites/myproject a git repo? Or just /site? Or somewhere else? Or is there a script a run that uses things like vault.yml to push to the repo I specified?

I read through the docs about it all and am just a little confused.

---

## Post 2 by @swalkinshaw — 2017-03-27T23:45:18Z

> [@s3w47m88](#):
>
> Am I suppose to make ~/Sites/myproject a git repo?

Yes. The docs reference the recommend set up and the example at [GitHub - roots/roots-example-project.com: Example Roots stack project (Trellis, Bedrock, Sage)](https://github.com/roots/roots-example-project.com).

Pushing or committing to your repo is done through Git as usual. Nothing really to do with Trellis. It just clones/pulls the repo if/when you deploy to a remote server.

---

## Post 3 by @s3w47m88 — 2017-04-03T21:16:17Z

Thank you for clarifying.

I don’t see anything in the instructions on Github or [the Docs](https://roots.io/trellis/docs/remote-server-setup/) that indicate there is anything special I need to do to export / import that so I assume WP-CLI is the recommended route?

---

## Post 4 by @swalkinshaw — 2017-04-04T00:02:32Z

Trellis has a `db_import` variable built-in which just loads a SQL dump into your DB, but for anything beyond that, yeah we recommend WP CLI.

> **[WordPress Sites | Trellis Documentation | Roots](https://roots.io/trellis/docs/wordpress-sites/#common)**
>
> Everything in Trellis is built around the concept of “sites”. Trellis will automatically configure everything needed to host a WordPress site.

---

## Post 5 by @s3w47m88 — 2017-04-04T00:35:18Z

Thanks @swalkinshaw

Do you see any reason why there couldn’t be a db\_export argument of some kind to automate this?

In my use case I can’t think of a time where I wouldn’t want to sync my database from `development` to `staging` if I’m pushing the rest of my code there. Do you (or anyone)?

It seems like if we had an argument that was like:

`db_export_and_import = true`

Also, do you guys poll your users at all? This is the type of thing I could imagine X% saying “No! I don’t want to sync my database everytime.” and then the other half saying they do.

---

## Post 6 by @strarsis — 2017-04-04T00:46:44Z

There are some nice tools for transferring the data (database + uploads folder usually):

> [@Leveraging WP-CLI Aliases in Your WordPress Development Workflow](https://discourse.roots.io/t/leveraging-wp-cli-aliases-in-your-wordpress-development-workflow/8414/22):
>
> Actually another pull request by @guilro is in line for automating database and file backups using [Stouts.backup](https://github.com/Stouts/Stouts.backup) Ansible role with [Duplicity](https://help.ubuntu.com/community/DuplicityBackupHowto) and is mentioned here: [https://github.com/roots/trellis/pull/650](https://github.com/roots/trellis/pull/650) . I think that would be really good to have and can be configured in many different ways.

---

## Post 7 by @swalkinshaw — 2017-04-04T00:49:57Z

I was just about to link what @strarsis did :slight_smile:

We primarily build features we need first. I think we did a poll once before or at least we wrote one and never sent it :frowning:

Either way, there’s just certain features we may not want to add even if a number of people would want it. DB syncing has always seemed like one of them. Not sure I have any great reasons for this.

---

## Post 8 by @s3w47m88 — 2017-04-04T01:07:30Z

Okay, I see how this conversation could go in a few directions.

I actually used [Revisr Plugin for WordPress](https://revisr.io) for backup automation. But I’ve never developed locally with it (the last time I did local development prior to Trellis was 5+ years ago).

But I didn’t think of something so robust for this particular task. Let me think on this and I’ll get back to you guys. Thank you for your time!

---

## Post 9 by @strarsis — 2017-04-04T12:51:43Z

Deploying the app (WordPress site) is different to transferring/syncing the actual data of the app.  
I always treat the production data as the source of truth (this was mentioned somewhere here in a thread already).

When developing apps (which also WordPress site is), often staging/development data is used that should resemble real world data, so it doesn’t have to be necessarily exactly the same as on production.

An alternative to overwriting is syncing the data between servers (e.g. production and staging/development), see this thread [Sync user (modified) content](https://discourse.roots.io/t/sync-user-modified-content/8906).
