Following the steps suggested in this answer, I managed to set a repository on my local machine, push it to the bare repository on the dropbox
folder and clone it to another local location. That is, invoked git clone ~/Dropbox/git/project.git .
in a directory ~/project-image
. This means that it seem to work fine - at least for me alone.
However, I don't manage to clone it using https
. From dropbox
I obtained the URL
of ~/Dropbox/git/project.git
and then tried something like
git clone https://www.dropbox.com/sh/xxxxxxx/xxxxxxx .
in another directory ~/project/image2~
. This didn't work... I got the following error:
warning: remote HEAD refers to nonexistent ref, unable to checkout.
In the answer I mentioned it seems like it is possible to share the bare repository from dropbox
. How? It seems like the URL
of the subdirectories changes for each subdirectory and thus git cannot clone. Is this the reason? Is there a way to overcome this? Note that I don't want to put the repository on the public part of my dropbox
and I want to share a link if needed.
Edit - Verify the repository on dropbox
: As per @Idx suggestion I ran, in ~/Dropbox/git
the following: cat project.git/HEAD
which returned ref: refs/heads/master
.