Essential Git Commands for Version Control
Classified in Design and Engineering
Written on in
English with a size of 4.08 KB
Essential Git Commands Reference
Core Repository Management
| COMMAND NAME | USE |
|---|---|
git init | Initialize a local Git repository. |
git add <filename> | Move a particular file to the staging area. |
git add . | Move all files to the staging area. |
git commit -m "commit message" | Create a new commit in Git with a descriptive message. |
git status | Check the status of the current repository and list changed files. |
git log | Show the list of all commits made on a branch. |
git log --oneline | View commit IDs in a brief, one-line format. |
git diff | Show the changes you have made in a file. |
git diff HEAD | Show the difference between the working directory and the last commit. |
git config --global user.name "name" | Set the global Git configuration for the username. |
git config --global user.email " |