Git-FTP and Web Development
|

Git-FTP and Web Development

From the way people write about Github you would believe that everything has to pass through it, for anything to work but after some trial and error I found this to be a misconception.

I found that with GIT-FTP on Github I could upload and download files to a website after each git update. I learned this through following instructions for another workflow. I followed these instructions but because I use disroot rather than github the workflow didn’t work for me. I considered migrating my repository to github but chose not to.

Experimenting with Git-FTP

I spent a lot of time experimenting with Git-FTP, not because it’s complicated to use, but because the instructions I had confused me.

When I experiment with Hugo I have a git repository that tracks the changes for everything but the public file, so when I tried to upload the website after telling it not to use public, I then had to delete tens of thousands of files from the FTP site, twice.

The workflow that is mentioned above works well if you’re on github but I am not so it was nice to try, but not that useful. The more interesting option is to use git-FTP directly with the “public” Hugo build directory.

Git, Git FTP and the Public directory

The quickest, smoothest workflow I found is to track changes within the public folder and upload to the ftp server that way.

  • Git init within the public folder and commit the initial version.

The instructions to Install Git FTP

The simplest way to [install git-ftp] on a mac is with Brew. Within a few seconds you’re ready.

The next step:

  1. git config git-ftp.url “ftp://ftp.example.net:21/public_html”
  2. git config git-ftp.user “ftp-user”
  3. git config git-ftp.password “secr3t”

After this you use git ftp init and it will upload all the files.

List of Commands

With this workflow you don’t need github or any other repository. You make your changes locally, update git, and once that is done “push” the files that have been changed. It takes seconds and a few lines of instructions

The Old Method

The old method, that I have been using for decadess, is to work on a file, save it, and then use filezilla, cyberduck or some other client and upload the changed files. This method requires you to keep track of dates, and ensure that all files, from all locations, are uploaded. By using git-ftp you eliminate the need for github and others, and upload files, straight after updating the git repository. I can see myself using this all the time from now on.

While writing this blog post I did come across this command.

-P, –ask-passwd : Ask for FTP password interactively.

If you use a machine that other people use then this command is a better one to use because I noticed that you can see information in clear text in terminal, which is not good. Anyone that has access to the computer can run check the terminal log and find that sensitive information.

In my case, and for my experimenting the ftp account I created only has access to the blog folder, and no others. In this manner only one folder can be compromised so easily.

The Beauty of This Tool

The beauty of this tool, in my eyes, is that I can work on a website and I can track changes with Git but I don’t need to use github pages, netlify or any other tools. I can create full fledged websites and webpages and update the site by updating the git repo and then git ftp push and within seconds the site that I’m working on is up to date, without being locked in to any other site where I am the product.

I like being self-hosted, and I disliked the idea of dumping a website and domain I have used for decades, to take advantage of a simpler workflow.

And Finally

Plenty of instructions and workflows show the benefit of using their products and their workflows, to lock you in to their system. By trial and error I learned that tools exist to streamline the workflow without github. Too much of the web is built around docker, github and other solutions. The result is that you find plenty of instructions for a technique that will trap you, rather than provide you with independence. My blog post is written to help you enjoy greater freedom.

Playing With Github and Visual Studio Code

Playing With Github and Visual Studio Code

Today I felt like taking a break from studying Wordpress. I played with some code from a book I got for free on the Apple Bookstore. At this moment this code is consolidation. I will get to the challenging stuff later. I have read, from many sources, that it’s good to have examples of your work online when you learn to code.


There are two steps to take although I don’t think the order matters. The first is to create a new repisotory on There are two steps to take although I don’t think the order matters. The first is to create a new repository on WordPress. In my case it is Laughing Raclette. The name is ridiculous, but it’s available, and absurdity and humour are good. Once you have created a repository, it will provide you with help on how to connect your local directory. I connected it via Terminal in VS Code, to my online repository. The process was quick and simple.


When I work from books and courses I commit changes to git at the end of each individual lesson. If it is video based this will be at the end of the video. If I am working from a book it will be at the end of the chapter. I have the same break points as the course. We can then step through our work. We can revise a chapter that we are struggling to get to grips with.


If you writing code and you make a typo, then git and github are useful. With track changes you can compare your erroneous code with that of the instructor. Once you know what the error is you can move on with the course. In future you know to look out for that typo, or erroneous code.


The other benefit of studying code and commiting to Git and Github is that we develop the habits that will be required prThere is another benefit of studying code and committing to Git and Github. It is that we develop the required professional habits. We learn to use the active voice, and to write clear, and succinct descriptions.


It is when we study that we need to pick up good habits. It allows us to show the trial and errors, in some case, but also the rate of progress. The skills that we practice as we learn, have the time to become professional habits later on. We can also get feedback during the process.