Open fralau opened 6 years ago
Hey @fralau,
Gitsync follows the git standards everywhere which is why it is compatible with the most popular services as well as any other git server. However, so far, I only ever took into account an authentication based remote origin.
I never actually tried a local git server. Could you show me how a .git/config
looks like when it's setup to use it?
Regarding the folders location. It should behave the same as it does with remote services. If you repo is on GitHub, for example, GitSync assumes your user/
origin is in the GitHub repository where the root of the repository is the actual user/
folder and so in there you see pages/
, themes/
and whatnot.
This also follows Grav's Skeleton standards (ie, https://github.com/getgrav/grav-skeleton-blog-site).
I would assume your local repository would be contained somewhere on your server outside of the Grav instance. If that's the case the I am guessing that you reference it in git
through the path /user/git/myrepo.git
or ~/location/of/myrepo
or something along those line.
If that's the case, and keep in mind having not dealt with this before I am just assuming, then we can make it work so that in GitSync you do pass that path location and we let it be added as the remote origin.
Sorry for not answering faster. The list of protocols available for git is defined here.
The command fo setting up a "local" remote repo is the same as for any other (git init --bare <directory>
).
According to the instructions, you can add a remote repo on the same filesystem in this way:
$ git remote add local_proj /srv/git/project.git
or
$ git remote add local_proj file:///srv/git/project.git
which is less efficient.
(The question is, of course, where GitSync will consider its local directory to be (for relative paths); unless it is recommended to use an absolute path.)
After a few tests, it seems that the one thing that fails is that the function doesn't know how to deal with an empty user (or else tries to insert a user to the path).
Thanks for the great plugin.
I would need a relatively simple setup where the git 'remote' repository is actually on the same machine than the git-grav application, and then a developer would just need to ssh into the machine for a
git clone
,git push/pull
, etc.I guess the plugin should be able to implement this practice since git admits the following file syntaxes:
In practice:
user
directory, for sure; but would it be feasible to create a new directory within the grav arboresence, e.g.archive
)?