Git integration

Would a Next cloud integration to git be worthwhile? There are cases where simplified use of Git would be helpful to have within Nextcloud, for example as done in SparkleShare.

1 Like

Nextcloud does basic file versioning, but I’m guessing you aren’t referring to that. Do you mean using Nextcloud as a git repository like Github or Gitlab?

In principle one can include a git repository in a folder that is synced to Nextcloud installation - Nextcloud being easier to use and enabling easy file sharing, but less suitable for code development. This would likely end up with some amount of data re-duplication. Would an app enable a more efficient version of including a git repository in a folder that is synced to Nextcloud? Would there be other features that would be helpful to have?

I’ve tried syncing a directory which is using git, but I ran into issues with file conflicts, assumedly because of the timing of how often files change vs how often files are synced to Nextcloud.

I don’t know a way around that, therefore I’m not sure if anything could be done with an app to handle it.

However, if you are looking for an app to act as a remote repository that you can push to, like Gitlab, that might be interesting. You wouldn’t sync through the desktop client in this scenario.

I see this is not an active thread but I would like to note now that it exists that I have ended up here a couple of times by now and that I would absolutely use and value such an app. My particular use case may be very specific but I have seen analogous ones elsewhere often enough to think that were such an app to exist (providing standard git functionality through the commad line: push, pull, clone), it would find users. I am looking to move a number of git repos from Keybase. I ended up there since it was possible to have any number of private repos. I have repos of writing, org-mode, personal wikis etc. I may share some but not all of these, to a handful of colaborators. For me, being able to use Nextcloud for such a case would be ideal.

I hope that may be considered useful feedback.

1 Like

In my opinion a file sync is not a good solution for git. Integrating an app might be interesting, but as I said before you would need to be careful not to sync that directory through the normal file sync.

I’d recommend either gitlab or gitea for self hosted open source git repo management. Feel free to also sync your git projects with nextcloud but get ready for conflicts depending on commit habits. Also watch out for unsynced files for example dot files (like .gitignore), just make sure you’re including everything.

1 Like

I’d love to see a gitlab integration app too.
I mean, why would an app be unable to avoid file versioning conflicts?

Of course there are alternatives… but for self hosted solutions having only one server for all the services is critical.

Git repos just aren’t designed to be synced by a file sync solution, but if you want to do that there’s nothing wrong with it. Maybe I just had a bad experience with things moving too fast for nextcloud and getting confused, but that can happen with any files and is not specific to git projects.

My point is that git projects should be synced to an actual git repo of some sort. If someone wants to build an integration to nextcloud that’s fine, I’m sure some people would use that. But remember, you would be pulling and pushing to that server just like you do with GitHub or anything else. Version control systems exist to let you commit only when you’re ready, with a message of your choosing. Not sure that can or should be automated.

And oh boy, gitlab would be an insane add on. If you thought installing the community document server was rough, wait till you install gitlab. It’s huge heavy on resources. On the other hand a light weight solution would be a little easier to manage.

Sorry I’m not sure I got what you mean. Yes I see your point on not using file sync as git repo and that is not what i would want.
Yet I’m not getting what does prevent a nextcloud app to act as git repo, with normal push pull etc functions.

If you say implementing gitlab would be hard, I can’t comment on that. What I meant was that I’d love to see it, not that it would be easy :sweat_smile:.
I should also add that I mentioned gitlab because it is a well working full featured open source project. But yes! A light weight solution to interact with as a git repository would be welcome as well!

Sorry maybe there is something that I’m missing, or maybe the other guys (@krozruch AND @kmnecl) didn’t mean the same thing (in which case I’d be posting in the wrong thread).

I would prefer gitea over gitlab.
Sry, doesn’t really add value to the discussion.

1 Like

I’m not even saying it’s necessarily hard (but maybe it is), but the fact that Gitlab is even larger than Nextcloud regarding the amount of services, files and resources it requires to run just makes it seem like it really doesn’t belong inside Nextcloud. In my opinion it’s a completely unrelated thing that has nothing to do with Nextcloud, so I’m just a little confused why someone would want to attempt this. Maybe that’s why it hasn’t been done (yet), but by all means if it helps someone I have no opposition to doing it. Just not something I would ever use (or recommend).

The original post here actually mentions sparkleshare which is completely different than integrating git functionality in Nextcloud. Sparkleshare stores the data in a git repo, which is another completely different conversation.

Now I see your point much more clearly :slight_smile:

1 Like

I understand the difficulties but use git for a number of personal projects including wikis, writing, org-mode, org-roam etc., the open defaults of most servers don’t quite fit my needs and I do not feel comfortable putting that data on most cloud servers. I was thinking of a very stripped down git server and thought this could make sense as a NextCloud app. Maybe I’ve got that wrong. I understand that GitLab would be way too bloaty but figured others might also find a use for this. Setting up and administering a plethora of services on my own is not a viable solution for me… Still, since I do not understand the technical barriers, if it is not right for NextCloud and/or demand is not there, I understand.

I was looking for a simple git client app inside nextcloud (something similar to the stopped project GitHub - klaussilveira/gitlist: An elegant and modern git repository viewer), but apparently that does not exist (yet).

Then I found this discussion and I am a bit confused about it: is it about setting up a git server or about working on files that are inside a git repository?

Setting up a git server is quite trivial (at least, if you have command line root access to the host) and needs to be done only once; and therefore not a case for an app in my opinion. What other regular tasks would you want to do through this app?

Working on the content of a git repository is much more complicated, depending on what you want to do. Simple browsing of files and histories and displaying metadata like commit comments should be ok, I guess (that is for example what the above mentioned gitlist application does), but modifying, committing, merging, branching etc. is quite complex and there are interfaces like gitlab who do that very well. Any nextcloud app could never reach that level of sophistication.

In my opinion, a read-only graphical interface with a feature set similar to gitlist, along with the possibility to initialise bare repositories which can be filled by any git client on your local PC would be perfect. Is that what you meant, too?