THE GITHTML FIELD GUIDE
Git vs GitHub: what runs locally and what lives online
Git is the version-control program that records snapshots and history in a repository. GitHub is an online service that hosts Git repositories and adds collaboration features. You can commit locally without an internet connection; sharing those commits requires a separate push to a remote repository you can access.
Separate the repository from the hosting service
A local project can have Git history even when it has no GitHub account, remote URL, or network access. The repository stores commits and references; your working files are the editable checkout. GitHub adds a place to exchange those commits, review proposed changes, discuss issues, and manage access. These layers cooperate but they are not interchangeable.
Consider a teammate editing a configuration file on a train. Saving changes updates the file. Staging selects a snapshot for the next commit. Committing records that snapshot in the local repository. None of these steps uploads the work, and none creates a pull request. This distinction explains many apparently missing changes.
Check which layer owns the task
Run these inspection commands from the project folder. The first checks the installed program, the second describes local changes, and the third lists configured remote addresses. A project with no listed remote can still be a valid repository. Inspect URLs before sharing terminal output because they may reveal private organization or repository names.
- Use Git for staging, commits, branches, merges, and inspecting local history. These operations concern repository state rather than a website interface.
- Use GitHub for pull-request discussion, repository access, hosted issue tracking, and browsing files online. A successful website login does not establish terminal authentication.
git --version
git status
git remote -vFollow one change through both systems
Suppose your local commit fixes a timeout. Review it locally, push the intended branch to an authorized remote, and then open or update a pull request if the project requires review. The push transfers Git objects and requests a remote branch update; the pull request supplies the collaboration context. Publishing a branch is not the same as merging it into the default branch.
The reverse direction is separate too. A browser edit on GitHub creates remote history, but your existing checkout does not instantly acquire it. Fetch retrieves updated remote information; integrating that history is another decision. When troubleshooting, name the exact missing event: unsaved file, unstaged change, missing local commit, unpushed branch, or unmerged pull request. That vocabulary prevents an account or permissions change from being used to solve a purely local problem.
An application can display GitHub files without implementing Git operations. Reading a repository document does not stage, commit, push, or synchronize your local project.
Sources and further reading
AI-assisted writing with source-linked guidance and illustrative examples. Read our editorial approach or report a correction.