06-02-2025 05:59 PM
My company currently runs an internal SVN server, which works since everyone here is on site. We have a project coming online soon that will need repository access from off-site, and for IT reasons* we cannot VPN to our network, nor can we open our server up to outside requests.
Right now we're considering running either SVN or git "locally" on each machine and syncing to a repository file hosted via Office 365. (Might be called a "Sharepoint drive" or "Onedrive" etc., I'm not super clear on the terminology).
Any recommendations for either git or SVN when running this way? I've heard of people complaining about partial folder syncs when committing or pulling information, so I'm a bit worried.
My thinking now is to use git, with the "top level" repo living in the share drive. Each developer then has their own local copy, and instead of pushing to a server/github/etc, they'll push to the shared one when they need to commit something to the main branch. This should mean they interact with the top level repo as infrequently as possible.
Any gotchas or caveats with this theory?
*It's not a "stubborn IT" situation... our IT team's hands are tied on this one. We have legal compliance issues that prevent us from enabling a VPN due to a transitional period as we update our server architecture. It's on the roadmap for sure, but we could get in legal trouble for doing it the wrong way, and we need a SCC solution in the short term.
06-03-2025 12:30 AM
I don't know if anyone will answer with an actual success story about that, but considering how OneDrive have messed things up with just normal files, I can imagine it will be worse with git. OneDrive is not a feature that syncs folders between PCs, it is an online folder that is mirrored to the PCs linked to that folder, so I guess there will easily be conflicts if files are updated from two places before all PCs linked to the folder are synced. I guess you already googled, but if not: it does not look good. The first I found (googled git+onedrive):
OneDrive is corrupting my Git repositories
Never put a git working directory on OneDrive
OneDrive and git - don't do it
So a shared folder that does not sync by itself is better. Lets see if someone else can give more insight about how to set that up in O365.
06-03-2025 01:00 AM
For git, at minimum you need to limit write access to one computer at a time to prevent the index from getting corrupted by competing changes. Patch files may help collaborators submit code changes without having write access or direct network access.
06-03-2025 04:49 AM
There are online SVN repo-sites, like ProjectLocker, you might want to look into that.
06-03-2025 09:56 AM
Thanks for the replies. I hadn't thought about two people trying to commit at once. We may be able to make some temporary policies to prevent that (e.g., only push to the central repo in your allotted time at night).
I'd googled it some and found some people saying it worked fine, but in retrospect I think it was single users doing it for something like their home network.
Regarding online repositories, the same IT reasons that prevent our VPN are keeping us from doing that 😞 Trying not to get too specific on reasons but I'm sure there are some of you out there with similar legal compliance requirements that may understand my use case. And I do apologize for vagueness on that front.
I will look and see if there's a way to lock files from multiple accessors for a short term solution.
06-04-2025 01:36 AM
It should work fine as long as no syncing is done automatically. Ask IT for a shared folder, be it via O365, SharePoint or whatever. Just make sure they don't do anything to that folder like syncing it or having OneDrive control it, and tell them what you will use it for, so any security policy or antivirus scanner does not trigger when lots of files are updated from several places. Doing backups of that folder should be OK as long as the backup system does not lock files and at the same time someone commits.
I'm not an expert, just have some practical experience. Maybe we will hear from someone with more specific suggestions.
06-04-2025 02:03 AM
It’s staggering, VPN or a (paid) online service like gitlab is no option because of security concerns but Sharepoint or OneDrive is perfectly fine! Can you ask them what stuff they smoke? It must be good!
06-04-2025 07:18 AM
Look into an enterprise GitHub server. That is what we have. It is fully maintained by GitHub, but there are special hoops we have to go through to get to it. We also have a bunch of closed networks that have dedicated GitLab servers. We maintain these servers. I would be looking into one of those solutions.
06-04-2025 07:52 AM
@crossrulz wrote:
Look into an enterprise GitHub server. That is what we have. It is fully maintained by GitHub, but there are special hoops we have to go through to get to it. We also have a bunch of closed networks that have dedicated GitLab servers. We maintain these servers. I would be looking into one of those solutions.
I would go with this approach. I'm working on a project right now where we have a similar workflow to what I think Bert is trying to do.
For this project we have a customer with a Git server that we can only access through one of those virtual desktops. The connection is pretty laggy and it's cleared all installed software before so what we end up doing is logging on just to clone the repo. Once it's cloned we'll do our normal commits locally and when we're happy with the state (or at the end of the day) we'll connect back to the virtual environment and push our changes to the server.
One of the big strengths of Git is that you don't have to always be connected to the server it's just everything is almost always connected at this point so you kind of forget.
06-04-2025 09:05 AM
If your IT department likes microsoft products, maybe they would be into DevOps which is Office 365 for developers. DevOps would be much better than trying to use Office 365 to manage a code repo / project, because that is exactly what DevOps is designed to do:
https://azure.microsoft.com/en-us/products/devops/#Features-3
Also let's not forget that github is owned by microsoft ... so is there an enterprise version you can pay for? of course there is : )
https://docs.github.com/en/enterprise-server@3.5/admin/overview/about-github-enterprise-server