Search

So I’ve been trying to get to grips with scripting for git to allow me to commit then deploy via FTP on Windows. I discovered git-ftp which looked promising but it was Linux flavoured, I followed the rabbit hole all the way to installing Cygwin and attempting to build it for Windows before realising I could just use PowerShell with Posh-Git and PSFTP (PowerShell FTP) instead. More to follow on that in the next post however though I’d share a few things I learnt about Cygwin first, no point in my learnings going to waste, this post is mostly a link dump.

Git-FTP can be found here and information regarding installing packages into Cygwin can be found at the source and there is a packpage manager, apt-cyg, that I never tried but looked useful.

A few issues I hit were that I sit behind a proxy at work so following this guide to configure Cygwin to have internet access.  The guide works for http access and if you need https access, just used this command;

export https_proxy=https://user:pass@host:port/

To access my existing git folder which sits in my Documents folder I mounted my C: drive in Cygwin then created a symbolic link;

mkdir /c
mount c: /c
cd ~
ln -s /c/Users/Username/Documents

This creates a folder named Documents in your home folder which maps to your Documents folder in your Windows user folder.  I found this in a cheat sheet on a Stanford users site, very useful so my thanks to them.

All fun learning, more info on my PowerShell solution in the next post.