git init | Initializes a new Git repository in the current directory. |
git clone <repository> | Creates a local copy of a remote repository. |
git status | Shows the current status of the repository. |
git add <file> | Adds a file to the staging area for the next commit. |
git commit -m "message" | Records the changes in the repository with a descriptive message. |
git diff | Shows the differences between the working directory and the staging area. |
git log | Displays the commit history of the repository. |
git branch | Lists all branches in the repository. |
git checkout <branch> | Switches to the specified branch. |
git merge <branch> | Combines changes from the specified branch into the current branch. |
git pull | Fetches changes from a remote repository and merges them into the current branch. |
git push | Pushes the local commits to a remote repository. |
git remote add <name> <url> | Adds a new remote repository with the given name and URL. |
git remote -v | Lists all remote repositories associated with the current repository. |
git stash | Temporarily saves changes that are not ready to be committed. |
git reset <file> | Removes a file from the staging area. |
git revert <commit> | Reverts the specified commit by creating a new commit. |
git fetch | Downloads changes from a remote repository without merging them. |
git tag | Lists all tags in the repository. |
git show <commit> | Displays information about the specified commit. |