Initializing and Inspecting Repositories
Use git init when starting version control in an existing directory. Use git clone when obtaining an existing repository. The git status command is one of the most frequently used Git commands because it explains the current state of tracked, modified, staged, and untracked files.
Running git status before staging, committing, switching branches, or cleaning files prevents many common Git mistakes.
git init
git status
git log --oneline
git branch
git remote -vThese commands help establish whether the directory is a repository, what changes exist, what commits are present, which branches exist, and which remote repositories are configured.
git initcreates a repository whilegit clonecopies an existing repository.git statusis the primary command for understanding your current working state.
Which command creates a new Git repository in the current directory?