Git in Action : Quick & Essential Commands
Git Command Cheat Sheet Setup & Configuration COMMAND DESCRIPTION git --version Check Git version git config --global user.name "Name" Set username globally git config --global user.email "email@example.com" Set email globally git config --list List all configurations git config --global core.editor "editor" Set default editor git config --global init.defaultBranch main Set default branch name git config --global alias.<alias-name> "<git-command>" Create command alias Repository Initialization COMMAND DESCRIPTION git init Initialize a new Git repository git init --bare Initialize a bare repository git clone <repository-url> Clone a repository git clone --depth <depth> <repository-url> Clone with limited history git clone --branch <branch-name> <repository-url> Clone a specific branch Basic Operations COMMAND DESCRIPTION git status Show working tree status git add <file> Add file to staging are...