cloudhead / toto

the 10 second blog-engine for hackers
MIT License
1.49k stars 244 forks source link

Not heroku installation problems #19

Open jartur opened 14 years ago

jartur commented 14 years ago

I think this might be pointed out that if you install on your own server and want to push there from your local machine you have to use a bare git repo on the server. But toto needs a working directory obviously. And you cannot push to a repo with a working directory. So if you use your own server you will have to make all your editing directly on the server or you'll have to #git reset --hard; git checkout -f on the server after any push.

I wonder how does heroko work around this issue? Maybe I can utilize their solution on my own server?

jartur commented 14 years ago

Okay. This hook helps: http://utsl.gen.nz/git/post-update

Maybe you should note this. It is not very obvious.

cloudhead commented 14 years ago

You're right, this can be very confusing.

The way I do it, which isn't ideal, but works, is to use a canonical repo, such as a github repo, then push my local changes to it, and pull my changes from the server. So something like:

local ---push---> github
server <---pull--- github

This works pretty good, but of course requires you to ssh into the server.

cloudhead commented 14 years ago

The other thing which comes to mind is Gitosis.

jartur commented 14 years ago

Can't toto use Grit to work with bare repos instead of working directory?

cloudhead commented 14 years ago

That's an interesting idea. I have very little experience with Grit, so I can't tell you for sure, but it's worth digging around.