Actually, this is a "git" question more than an
IDE question.
Speaking from a position of general ignorance, I suspect that you can
create a git repository locally and
attach to a git repository remotely. Or, more precisely, sometimes more than one of either or each type of repository.
You may discover that the primary difference other than that is that you'd specify an Internet URL (http, https) for the remote repos, but use a simple file path (or the "file:///" URL format) for the local repos.
Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.