Why heroku push is being rejected?

Is it possible to just push a git repo to your root directory instead of using ftp?

  • I like the way that heroku works with rails. You just have to write 'push heroku master' and magically your app is live. I wish that I could do the same for some of theĀ  wordpress sites that I have on shared hosting servers. The way that I currently do things is by editing the files I want to change and just using ftp to update them on the server. I wish I could just do everything locally using git and then push my changes to the server. Is there a way to do this? I feel much more organized when I am using git. The way I do things now feels very hacky and fragmented.

  • Answer:

    You can of course, but only your files will be in the repository, not your database. So you will still have to make database changes the traditional way. In order to organize your git repo in a way that will make it easy for you to push to your server from your local, you will have to follow a few steps: - Organize your config file: http://markjaquith.wordpress.com/2011/06/24/wordpress-local-dev-tips/ - Set up SSH keys on your computer and on your remote server to allow for easy pull/push without having to enter your login credentials all the time. - Create a repo in your existing directory on your remote server (git init) - Clone this repo onto your local machine - And that's it. From now on, you can commit changes you make locally, and push them onto your remote server whenever you are ready. Have a look at this article for a bit more details: http://tumblr.intranation.com/post/766290565/how-set-up-your-own-private-git-server-linux

Jeremy Herve at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.