Git Overview

SpinupWP fully supports git-based sites out-of-the-box, including Bedrock. We also have our own git and Composer template, designed for SpinupWP. You can even configure push-to-deploy so that any code changes are automatically deployed to your server as they’re pushed to a git provider like GitHub or Bitbucket.

Whenever a git deployment is triggered (either manually or via push-to-deploy), SpinupWP will SSH to your server and perform the following commands:

git remote update
git checkout -f BRANCH

This will overwrite any modified files within the site’s ~/files directory that are managed by git. Files that aren’t managed by git, or files within a .gitignore won’t be modified or deleted.

For example, let’s say you modified the wp-config.php file on your server, but you also store this in git. The next time a deployment is triggered, wp-config.php will overwrite the file on the server and your changes will be lost.

Running Git Commands

SpinupWP uses a mirror repo to deploy your site to the server. This means that you can’t run git commands directly from the ./files directory. Although you shouldn’t need to run git commands directly on your SpinupWP server, it can be useful in some scenarios. For example, you may want to see which files are in your site’s ./files directory but aren’t stored in git.

When running git commands, you should run them from the site’s root (i.e. /sites/yourdomain.com/), and you must specify both the git and working directories:

git --work-tree=./files --git-dir=./git status

Start Your 7-Day Free Trial

Start your SpinupWP journey today and spin up your first server within minutes.

Start Your Free Trial

No credit card required

Subscribe to get the latest news, updates and optimizations in performance and security.

Thanks for subscribing 👍

To receive awesome stuff, you'll need to head to your inbox and click on the verification link we sent you.
Make sure to check your "spam" folder or your "promotions" tab (if you have Gmail).
If you're still having trouble, then messages us at sudo@spinupwp.com.

You are already logged in

It looks like you are already logged in to SpinupWP.

Please log out of this account to continue.

Registration Successful

Thanks for registering for a new
SpinupWP account.

Before getting started, could you verify your email address by clicking on the link we just emailed to you?

SpinupWP

Free Trial

Start Your 7-Day Free Trial

No credit card required. All features included.

By signing up to SpinupWP, you agree to our Terms and Conditions.
For privacy related information, view our Privacy Policy.