Skip to content

Initialization and Configuration

CommandDescription
git initCreate a new repository in the current directory.
git configSet Git configuration options, like user name and email.

File and Directory Management

CommandDescription
git ignoreManage files and directories to be ignored by the repository.
git rmRemove files from the repository and staging area.
git mvMove or rename files within the repository.
git cleanRemove untracked files from the working directory to keep it clean.
git archiveCreate an archive (e.g., .zip or .tar) from the repository content.

Status and History Inspection

CommandDescription
git statusDisplay the current status of the working directory and staging area.
git logShow the commit history with details like hash, author, date, and message.
git reflogDisplay the reference history, showing actions related to HEAD.
git diffShow differences between files or versions, such as between commits or between the working directory and staging area.
git blameShow who last modified each line of a file and when the changes were made.

Submodules and Worktrees Management

CommandDescription
git submoduleManage submodules, which are external repositories embedded in the main repository.
git worktreeManage multiple working directories within the same repository.

Cleanup and Optimization

CommandDescription
git pruneRemove unreachable objects from the repository.
git cleanRemove untracked files from the working directory to keep it clean.

Debugging and Searching

CommandDescription
git bisectUse binary search to find the commit that introduced a bug.
git grepSearch for patterns within files in the repository.

Released under the MIT License