Build With Anant

Build With Anant

Share this post

Build With Anant
Build With Anant
Git FTP for Windows

Git FTP for Windows

Anant Garg's avatar
Anant Garg
Sep 25, 2013

Share this post

Build With Anant
Build With Anant
Git FTP for Windows
Share

Why are we still using FTP?

If you are using a shared host like GoDaddy, Asmallorange etc. they have limited options when it comes to uploading your code to their servers. Most will provide only FTP access. If you are using Git (or GitHub) for your development purpose, it becomes a huge inconvenience to use an FTP client to upload the files manually. If you have a large set of files, then you also need to manually upload only the changed files.

With this solution, you will not need to use an FTP client.

Step 1

Begin with downloading msysgit for Windows. At the time of writing this, the latest file is “msysGit-fullinstall-1.8.4-preview20130916.exe”. Click on the link below to download.

Download msysgit When prompted, extract to “c:\” and this will create a “c:\msysgit” folder. It may take a while to download and install. Step 2 On completion, it will launch c:\msysgit\msys.bat (you can run it manually if it doesn’t). Then simply run the following commands one-by-one: cd ~ git clone https://github.com/git-ftp/git-ftp git-ftp.git cd git-ftp.git && chmod +x git-ftp cp ~/git-ftp.git/git-ftp /bin/git-ftp

On completion, close this window and create a shortcut to “c:\msysgit\git-cmd.bat” (Note this is different from msys.bat)

The Workflow

Committing Changes

I use GitHub so I prefer using their simple tool for committing changes. You can use the command-line version as well if you need more control. If you need a good guide to learn Git, I suggest:

Easy version control with Git

Pushing to FTP

1. Simply launch git-cmd.bat
2. This will load a standard command prompt. Go to your working folder (which you want to synchronize) [must be git repo].
3. For the first time, add your FTP details

git config git-ftp.user demouser
git config git-ftp.url ftp.example.com/demofolder
git config git-ftp.password demopassword

4. To initialize, run the following command for your first commit only

git ftp init

5. After this, for all subsequent commits

git ftp push

That’s all folks!


Discuss, Share & Subscribe

Do let me know your suggestions on how I can improve this tutorial. If you like what you are reading, then please help spread the word by re-tweeting, blogging and sharing this tutorial. Thank you.


Subscribe to Build With Anant

By Anant Garg · Launched 6 months ago
Demystifying AI-powered software building, one app at a time

Share this post

Build With Anant
Build With Anant
Git FTP for Windows
Share

Discussion about this post

User's avatar
Cross-domain cookies/sessions in Safari and all other browsers
Want to read a simplified version of this article?
Feb 18, 2010 • 
Anant Garg

Share this post

Build With Anant
Build With Anant
Cross-domain cookies/sessions in Safari and all other browsers
Write your own PHP MVC Framework (Part 1)
What is MVC?
Mar 13, 2009 • 
Anant Garg

Share this post

Build With Anant
Build With Anant
Write your own PHP MVC Framework (Part 1)
Build a PHP SaaS app from scratch
This is the first of 3 posts which will talk about launching your own SaaS product (or converting your existing single tenant app to a SaaS app).
Jun 10, 2013 • 
Anant Garg

Share this post

Build With Anant
Build With Anant
Build a PHP SaaS app from scratch

Ready for more?

© 2025 Anant Garg
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share

Create your profile

User's avatar

Only paid subscribers can comment on this post

Already a paid subscriber? Sign in

Check your email

For your security, we need to re-authenticate you.

Click the link we sent to , or click here to sign in.