Repository Management --------------------- | Command | Description | | --- | --- | | `git init` | Initialize a new Git repository | | `git clone ` | Clone a remote repository | | `git status` | Show the working tree status | | `git add ` | Add a file to the staging area | | `git commit -m ` | Commit changes to the repository | | `git push` | Push changes to the remote repository | | `git pull` | Pull changes from the remote repository | | `git fetch` | Fetch changes from the remote repository | | `git merge ` | Merge a branch into the current branch | | `git branch` | List all branches | | `git branch ` | Create a new branch | | `git checkout ` | Switch to a branch | | `git checkout -b ` | Create and switch to a new branch | | `git branch -d ` | Delete a branch | | `git log` | Show commit logs | | `git diff` | Show changes between commits | | `git blame ` | Show who changed each line in a file | | `git reflog` | Show a log of changes to HEAD | | `git reset --hard ` | Reset the repository to a commit | | `git revert ` | Revert a commit | | `git stash` | Stash changes in the working directory | | `git stash pop` | Apply stashed changes to the working directory | | `git tag ` | Create a tag for a commit | Configuration ------------- | Command | Description | | --- | --- | | `git config --global user.name ` | Set the user name for Git | | `git config --global user.email ` | Set the user email for Git | | `git config --global core.editor ` | Set the default text editor for Git | | `git config --global color.ui auto` | Enable colored output for Git | Remote Repositories ------------------- | Command | Description | | --- | --- | | `git remote add ` | Add a remote repository | | `git remote -v` | List remote repositories | | `git remote show ` | Show information about a remote repository | | `git remote rename ` | Rename a remote repository | | `git remote remove ` | Remove a remote repository |