Git with curlftpfs

692 Views Asked by At

I want to use a FTP server as a git repo. The only way I know to do that is mounting the ftp with curlftpfs.

But with curlftpfs it is not possible to do any git command.

Is there another solution for that?

I can´t use rsync because I have problems with deleted and new files. If I create or delete a file on the source this should happen on the destination too. For this I can use the --delete and update option. But if there is a new file on the destination that don´t exist on the source the file should not be deleted. I think this is not possible with rsync because it don´t have any history saved.

2

There are 2 best solutions below

0
On

It may at least be possible to create a local single-user git repository on a cuteftpfs, or other FUSE mounted file systems. The git --separate-git-dir option comes in handy to place the git repository back on your physical file system.

% cd /home/xxx
% mkdir myproj
% curlftpfs ftp://mysite.com/myproj myproj
% chdir myproj
% git init --separate-git-dir ../myproj-git
% cat .git
gitdir: /home/xxx/myproj-git

This has the advantage of making it easy to mirror between the FUSE mounted file system and a local directory.

% git clone . ../myproj-local
0
On

I assume the problem is that the FTP file system is limited compared to a regular unix file system. I am trying to build something that enables to push to FTP, so you at least pull and push to FTP.