How to set up a repository using git-ftp?

ftp, git, git-ftp

Solution

You have to setup a git repositor first:

Enter your Project directory:

cd my/Project/

Init a git repository on it:

git init
git add .
git commit -m "Initial commit"

Configure you FTP:

git config git-ftp.user demouser
git config git-ftp.url ftp.example.com/demofolder
git config git-ftp.password demopassword

Init the git-ftp client:

git ftp init

Push your changes to FTP:

git ftp push

Make your changes and commit:

git add someFile.html
git commit -m "Added someFile.html"

Push your changes again and only what have changed is pushed:

git ftp push

That's it.

Problem

I'm a newbie so please explain how to set up a repository? I installed git-ftp. I tried : `git ftp init -u my_User-p my_Pass - ftp://host.example.com/public_html` but I got this error message : fatal : Not a git repository (or any of the parent directories): .git fatal : Not a Git project? Existing .... terminal screenshot

Original source