john123
Posts: 24
Joined: Wed Nov 04, 2015 12:15 pm

Setup Git Server for Pi on Windows Machine

Sat May 23, 2020 11:31 pm

I'm doing some development on a PI where source is on PI, and my SD card just failed. I had previously tried to install GIT on my home windows PC, but got frustrated with it, after some of the software from the site I was following asked me for my credit card number. Instead, I just copied the entire directory over (so thankfully, I didn't loose any work). After the failure, I'm looking to set up a GIT server again, but still I can't find a good website with instruction on how to do this.

Ideally, I'd like to just host the remote repository -- I don't need any windows GUI or anything like that, so something that just runs a simple server in the background would be great. I'm wondering if someone can point me to a good website that describes how to do this, or can give me some pointers on how this is done.

Thanks,

John

User avatar
Greg Erskine
Posts: 136
Joined: Sat Sep 15, 2012 4:20 am

Re: Setup Git Server for Pi on Windows Machine

Sat May 23, 2020 11:53 pm

I have used SmartGit for Windows 10 for many years to manage git. (It does have a GUI though) Works great for me.

As a side note, I use WinSCP for syncing files between RPi and the Windows git directory. I use Notepad++ for editing RPi files directly via WinSCP. Once you get the settings for EOF markers worked out, you are set.
* Raspberry Pi is a trademark of the Raspberry Pi Foundation

User avatar
DougieLawson
Posts: 38553
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Setup Git Server for Pi on Windows Machine

Sat May 23, 2020 11:58 pm

I run Gitolite on a RPi with the repos stored on a shared NAS drive.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

User avatar
dickon
Posts: 1281
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: Setup Git Server for Pi on Windows Machine

Sun May 24, 2020 8:09 am

Bear in mind that git's performance on Windows is so utterly abysmal that Microsoft decided to look into it, and concluded that their filesystem and VFS-equivalent design is so atrocious[0] that it's actually pathological for git. You're probably better off running a repo in a VM on Windows than natively.


[0] Basically, for virtually every operation you can think of -- open, read, write, close, delete, etc. -- the kernel runs up and down an entire stack of functions and callbacks, so misfeatures like (anti)virus can get in the way and inspect and fiddle. That comes with a huge performance penalty, and git does an awful lot of that sort of thing.

User avatar
B.Goode
Posts: 9886
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Setup Git Server for Pi on Windows Machine

Sun May 24, 2020 9:21 am

john123 wrote:
Sat May 23, 2020 11:31 pm
I'm doing some development on a PI where source is on PI, and my SD card just failed. I had previously tried to install GIT on my home windows PC, but got frustrated with it, after some of the software from the site I was following asked me for my credit card number. Instead, I just copied the entire directory over (so thankfully, I didn't loose any work). After the failure, I'm looking to set up a GIT server again, but still I can't find a good website with instruction on how to do this.

Ideally, I'd like to just host the remote repository -- I don't need any windows GUI or anything like that, so something that just runs a simple server in the background would be great. I'm wondering if someone can point me to a good website that describes how to do this, or can give me some pointers on how this is done.

Thanks,

John

I have found gogs https://gogs.io/ to be a straightforward way to implement my own git repository server on a spare RPi board. But it is cross-platform, so you could host it on a Windows system if you really wanted - I've never had the need.

Return to “General discussion”