Git

Linus Torvalds invented both the Linux Kernel and Git.

The Linux kernel is the heart of Linux. It’s how your operating system connects to your hardware and all of the applications running on your desktop.

Git is the tool Linus invented to record the changes you make to the software you are working on and to make collaborating with other programmers practical. You install git on your computer globally.

Project Development

When you start a new project, you make a new directory for that project, in your Projects directory, and then make a container for the project using LXD, venv or some other containerization tool. Then, you run the [git init] command in that container to start a new git repository for that project.

When you change the code of your project you use [git add] to stage the change, then [git commit] to commit the change. Use [git push] to push the changes from your local development environment to any remote repository, or to the servers where your website is hosted.

You have to have a website built on a Virtual Private Server (VPS), to be able to use Git and SSH to securely log into your live website backend, from your local development environment. The commercial server your website is hosted on is your remote server. Build your local development environment on your personal computers and then use secure shell, SSH, to log into your remote server and edit the files on the remote server.

You’ll have to do all the maintenance and repair. Your hosting company does not have root access to your VPS. This is part of the learn how to use your tools to build your own, do it yourself, full stack web development strategy.

It may be a good idea to use sFTP to start with. Secure File Transport Protocol is quite a bit easier to learn and get started with. Then, you should definitely learn how to use Git and SSH to connect your local development environment to your Github or Bitbucket repositories and your live websites.

Secure Shell

Use SSH to securely push and pull changes back and forth between your local development environment and your remote servers. You’re going to have a remote git repository, so you can have teams of programmers working on your projects. And you will also have remote, commercial servers for your live websites.

You could host your own website, but I don’t really recommend that because of the danger of losing your data in a fire or earthquake. It’s up to you. Self hosting has its advantages, especially with all the censorship going on lately. I just like having that last link to the Internet professionally secured and free flowing.

You can also use Github, Gitlab or Bitbucket or Linode, etc., to create a remote repository for your projects, which can be accessed by a team of programmers working on the same project.

Learn how to use Git. Get in the habit of documenting your work. Record everything and back it all up. You should always have at least two computers, in case one of them crashes for any reason or is stolen or damaged. Back up your hardware.

So, you’ll be developing at least two local development environments. That will help you increase your experience. You’ll use Git to record your experience on each machine and then merge the two experiences using SSH.

Get a Bitbucket or Github account and keep a copy of your development projects online, that way, if your house burns down and you lose all your computers, you still have a copy of everything in your GitHub repositories.

Installing Git is easy, just sudo apt install it, or sudo pkcon install it. Using it is fairly easy as well. Every time you edit a file you add it to your staging area. Then you commit the changes you’ve made. You always add a comment describing what changes you made and why you made the changes. Then you push them to your remote servers using SSH.

Use Dissenter or QuteBrowser and DuckDuckGo to search for the details. Brave is a web browser and search engine all rolled into one great application. ProGit, by Scott Chacon and Ben Straub, Apress, 2014, is a great book to read to learn how to use Git well. The one I have is 6 years old now, so there is probably a newer, better one available now.