You can use Git entirely on your own machine, but hosting it on GitHub adds collaboration: shared repositories, code review on pull requests, issue tracking, and automation. It's become the default home for both open-source and private code.
The distinction trips people up because the names sound linked. Remember that Git works without GitHub, but GitHub (and its rivals) exist to make Git-based teamwork easier, with a web interface and extra features layered on top.
Updated July 2026