Git 2 reference · 8 entries
Git Basics
Create repositories and record changes: git init, config, status, add, commit, log, diff and show.
| Name | Description | Since |
|---|---|---|
git init |
Create a new Git repository in a directory, optionally naming the first branch, ready for the first commit. | |
git config |
Read and set Git settings per repository, per user (--global) or system-wide, such as your name, email and aliases. | |
git status |
Show which files are staged, modified or untracked, and how the branch relates to its upstream. | |
git add |
Stage changes for the next commit: whole files, all changes, or selected hunks with -p. | |
git commit |
Record the staged changes as a new commit with a message; --amend rewrites the latest commit. | |
git log |
Show commit history: one line per commit, as a graph, filtered by author, date, path or message. | |
git diff |
Show changes: working tree versus staging area, staged changes (--staged), or between commits and branches. | |
git show |
Show a commit's message and changes, or the contents of a file at any commit with COMMIT:PATH. |