Skip to content

Instantly share code, notes, and snippets.

@p1nox
Last active August 29, 2015 14:14
Show Gist options
  • Save p1nox/9b79a9b919f017195deb to your computer and use it in GitHub Desktop.
Save p1nox/9b79a9b919f017195deb to your computer and use it in GitHub Desktop.
Wordpress on OpenShift using git

Wordpress

  • In your application page inside openshift, in the right side you'll see a section called "Source Code", copy the url.

  • In your console (in the folder you want to have the source code), execute:

      git clone <SOURCE_CODE_URL>
    
  • And your done, now you have your page's code locally.

Change original committer

  • Remove git history and re-init the repo:

      rm -rf .git
    
      git init
    
      git commit -m "init commit"
    
  • Now you are the original commit of your wordpress app, you can check that with:

      git log
    
  • Change the git remote url:

      git remote add rhc <SOURCE_CODE_URL>
    
      git push -f rhc master:master # (I called "rhc" just because that's the name of the openshift gem)
    
  • And your done, now locally and in your git repo inside openshift, you are the committer of your wordpress app.

Source - OpenShift Online: Using the Git Repository.

*** If you want to know more, you should read this post from TutsPlus, way better than mine ;).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment