why do I get this error "make: *** No rule to make target 'all'. Stop."

There are multiple ways to install software in Ubuntu. You can install software using APT, Snap, Flatpak, AppImage, installing from source, etc.

As far as what I can understand, you are trying to install git from source.

I would personally not suggest new Ubuntu/Linux users to install software from source as it is a bit complex than compared to other methods.

In the article which you have mentioned, following these steps will install git using APT:

Debian / Ubuntu (apt-get)

Git packages are available via apt:

  1. From your shell, install Git using apt-get:
    $ sudo apt-get update
    
    $ sudo apt-get install git
    
  2. Verify the installation was successful by typing
    git --version:
    $ git --version
    
    git version 2.9.2
    
  3. Configure your Git username and email using the following commands, replacing Emma's name with your own. These details will be associated with any commits that you create:
    $ git config --global user.name "Emma Paris"
    
    $ git config --global user.email "[email protected]"
    

To know more about installing software in Ubuntu, read these:

  • https://medium.com/geekculture/5-different-ways-to-install-software-on-ubuntu-linux-14ae6b95d1d2
  • How do I install a .tar.gz (or .tar.bz2) file? (I suggest you research a bit about checkinstall.)