I’m trying to switch from syncing my server with my local computer via FTP to using Git and SSH. And most of the things I wanted are working except for the Auto Git plugin. But I’m pretty sure it is my fault. Here’s what I’ve done so far:
- Setting up a local repository using Tower on my Mac.
- Establishing an SSH connection to my server.
- Creating a bare repo on the server with
git init --bare .git
post-receivea hook like described in this guide.
- Back on my Mac, adding the remote repo to my local one using Tower.
The result is that I can push any changes I commit on my Mac using Tower to the remote. If I run the site locally using MAMP and make some changes in the Panel the Auto Git plugin even makes a commit to the local repository and I can push it to the remote server. However when I log in to the Panel on my server (i.e. not locally) and make some changes Auto Git doesn’t commit them and the widget says that there is no remote found.
Can anybody tell what I did wrong. I have a slight guess that it might has to do with the fact that on the server there is only a bare repo. When connected via SSH and I make some changes live on the server I can’t commit them either an Git says
fatal: This operation must be run in a work tree
So it might be a problem in my configuration. But what can I do to fix it …?
Thanks in advance and cheers,