How to add git repository to PlatformIO dependencies (lib_deps)

Typically, you would add a PlatformIO library dependency by adding the following to platformio.ini:

lib_deps =
    bblanchon/ArduinoJson@^6.21.3

but you can also add a git repository (the following example uses the main branch such as master or main):

lib_deps =
    https://github.com/ulikoehler/HumanESPHTTP.git

or you can use a specific branch or tag

lib_deps =
    https://github.com/ulikoehler/HumanESPHTTP.git#v1.0.0