Starting a new project or joining an existing one both rely on a small set of foundational Git commands. The command git init initializes a brand-new repository in the current directory by creating the hidden .git folder that holds all version-control data. To obtain a copy of an existing remote repository, developers use git clone <url>, which downloads every branch, tag, and historical commit into a new local working directory.
Once a repository exists, changes move through Git's three areas in a deliberate workflow. The command git add <file> stages modifications from the working directory into the index; git add . stages every change in the current directory at once. After staging, git commit -m "message" records those changes as a permanent snapshot in the local repository. The accompanying commit message should concisely describe the purpose of the change, helping teammates understand the project's evolution.
Two commands help developers stay oriented throughout this workflow. Running git status displays the current state of the working directory and the staging area, listing which files are modified, untracked, or ready to be committed. To review what has already been committed, git log prints the commit history, showing hashes, authors, dates, and messages. Options such as --oneline or --graph produce compact or visually structured views, which are especially useful in projects with many branches.