Is it possible to have a local git repository folder inside the folder I use for “normal” file sync with nextcloud? Or would it mess up my git folder?
I use markdown files to store my notes, which I want to always have available in my nextcloud webapp and share selectively with other users.
But I also jekyll to render those md-files into static webpages, which I publish via a git push from multiple clients triggering CI Travis.
Also I want to benefit from the git version control for both jekyll scripts and markdown files.
Can I somehow benefit from both, git features and nextcloud, but having git folder in nextcloud sync folder?
I have a folder with local git repositories synced to my nextcloud instance using the desktop client.
I’ve had issues trying to do this with Android projects. I would recommend not doing this. There’s not really a need to store the contents of the .git directory in Nextcloud and you may run into problems silently before you realize there’s an issue.
A possible workaround might be to set up ignored file patterns so you don’t sync the .git directory.
Just wanted to let you know: I’m trying this now since 2 weeks, no issue so far. Leaving thread open: maybe someone has more insights?j
That’s good to know. If I remember correctly my problem had to do with the number of files that would change during commits, and also NC was syncing changes to cache files that are generated during Android build which is completely unnecessary. So if I made a new commit before NC was done syncing everything from the last commit I would get conflicts in the .git folder and it wasn’t worth the hassle. Probably something that could be fine tuned, but I guess I’d rather just leave NC out of the equation when it comes to version control for development. After all, NC is not designed to be a backup tool although it can work well for that in most situations.
I’m new to the discussion and would like to ask something about it. I used to sync my .git folder via NC but this was done via selecting “sync hidden files”. In order to overcome this limitation I would have to make all “.git” folders permanently visible but I would rather keep them hidden and add an exception to the syncing rules.
The problem with “sync hidden files” is that there are a lot of files synced when editing - let’s say - office documents. These $…$ files are very annoying and caused several conflicts already, but “.git” never was an issue. So is it better to stick to “sync hidden files” and add an exception to the list of “Files ignored by pattern”? Or is there a way to add the .git folders without selecting “sync hidden files”?
Thanks in advance!
I think you should create a “bare” repo and sync this with nextcloud. So you have synced only needed files and have all the version information in it. There is no “.git” folder in there.
The disadvantage is that you can not open or edit the files in the Web-UI…