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