jachin / GitSync

This tool allows a developer to work on files on their local machine and have their work synced on a remote system. It uses git to manage the syncing process.
MIT License
31 stars 3 forks source link

Fails if local directory already exsits #13

Closed jachin closed 9 years ago

jachin commented 10 years ago

If the directory specified in the local_path of the config is already there, git syn complains about a missing repository.

fatal: Not a git repository (or any of the parent directories): .git

It should give a more helpful error message, and ideally, it would use the directory anyway as long as it was empty and complain if it wasn't.

centerorbit commented 10 years ago

I have encountered this as well, because I put my .yaml files inside the folder of the directory. Imagine my dismay when nothing would work if I already created the local folder and put my config inside, and THEN tried to run git_sync.

Since this is all CLI, can we have it stop and ask what you want to do in the case that the directory isn't already empty? Something like "Local files found! Add these to git_sync repo? (Y) yes, (n) no and abort.". That way you could drop git_sync on a locally built project and simply use it to "deploy" to a server.

jachin commented 9 years ago

Fixed in jachin/GitSyncLib@12f4177934a5bc2d8103fa32e6d3b9f8a3ae398b Eventually this it make it's way to a release.

jachin commented 9 years ago

Ok, now I think it's fixed jachin/GitSyncLib@65a5a9f4f6c5babf8db51e56a8bf45554e17fc17