whats new in tech

What’s New In Tech?

June 25, 2021
laravel livewire

Laravel Livewire

July 5, 2021

How To Setup Git-ftp For Windows

June 29, 2021 / Rayne Falkenberg

Why use git-ftp?

If you use git and you need to upload your changes to an ftp server, git-ftp saves you the troubles of identifying which files you changed and then uploading each individual file. Git-ftp uploads only the files that have changed. Once setup it is simply 1 line to deploy your changes.

 

How to setup Git-ftp?

 

  1. First you will need to have git installed. You can download git from here. If you have sourcetree or any alternative you will already have git installed.
  2. After installing note where your git was installed as you will have to use it in the steps below.
  3. Go to your start menu and search Git Bash, right click and select run as administrator.
    • Then enter the below command, this is to check which git file we need to install git-ftp:
      • which git
    • If the response is /bin/git then follow the below steps:
      • Then type the following commands by pressing enter after each line.
    • If the response is /mingw64/bin/git then change the commands to the following:
    • Now Git-ftp is installed and ready to be configured.

 

Configuring Git-ftp

 

You will need to have either a local git repository set up or a remote git or bitbucket repository.

How to create a local repository?

 

  1. Hold in the windows key and press r, then type in CMD and press enter to open Command Prompt.
  2. Got to the directory your project is saved under by typing ‘cd’ and then the directory (eg. cd C:\Users\Rayne Eden Logan\Documents\myproject )
  3. Then type git init and press enter. This will create a .git hidden folder in your project folder.

 

Saving of ftp credentials:

 

  1. In your Command Prompt navigate to your project folder (as in the above steps 1 and 2) and type the below commands pressing enter after each line:
    • Where ftp_host, username and password must be replaces with your ftp credentials

 

Using Git-ftp

 

If it is the first time you are running git-ftp then run the below commands:

 

 

After the first time your will then have to run the below commands:

 

 

If you did not save your ftp credentials you can run the below command when pushing your changes:

 

Happy Coding!

Share

Rayne Falkenberg

Rayne is a developer manager with experience in web apps, mobile apps and project management.

✕
How To Setup Git-ftp For Windows
This website uses cookies to improve your experience. By using this website you agree to our Data Protection Policy.
Read more