gleber/erlgit — pull request #2 by fogfish (2013-09-19 20:42:42+00:00)
Title: new functions: init, add remote

Hello,

I got a problem with git:clone, it failes
fatal: destination path '...' already exists and is not an empty directory.

the issue comes by the fact that I need to "clone" repository to existed empty folder. Due to nature of my app, I cannon remove that folder.

The typical git workflow to overcome depicted problem is following:

git init .
git remote add -t \* -f origin
git co master

I've added equivalent function to the library

git:init("/tmp/erlgit").
git:remote("/tmp/erlgit", "https://github.com/fogfish/erlgit").
git:checkout("/tmp/erlgit", "master").