Skip to content

What are the essential Git commands?

git init

Initializes a Git repository.

git config

Lists configured settings.

git help

Lists Git help topics.

git add

Adds a file to the staging index.

git commit

Commits a file to the repository.

git status

Shows the status of the working directory.

git log

Shows a log, or history, of commits.

git clone

Creates a copy (or clone) of a repository in your working directory.

git diff

Shows unstaged changes between your index and working directory.


Sources
  • Skoglund, K. (2019). Git Essential Training: The Basics [Video]. LinkedIn Learning. https://www.linkedin.com/learning/git-essential-training-the-basics
  • Pro Git
  • Atlassian Git Tutorial