I took the comment as referring to hosting just a git repo on a public server. If you are working on a private project a simple option is to get a cheap VPS, give all your developers user accounts, and clone the repo into a shared folder. Everyone can pull and push with ssh and you can use Trello or whatever for issue tracking. Certainly that doesn't cover every use case, but it's worth being aware of the option and not feeling that you can't use git unless you pay github or spend a lot of time setting up a self-hosted clone of github.
How is getting a VPS and running a git server, then setting up everyone's SSH key and accounts and then setting up accounts on trello and whatever other services you need (How are you doing CI in this setup) meant to be easier than dropping gitea on a server and having everything you need in one place and with a simple GUI.
Sure you CAN use git without a web UI, We had that at work for a while and it was not a good experience at all compared to using gitlab which we have now and we now have so many features that let us get things done faster.