Git Cheat Sheet
Git Cheat Sheet
This cheat sheet provides common Git commands with an example to help you understand
the basics.
1. Setting up Git
1. Configure your Git
1. Run the following commands to set up your Git username and email globally:
2. Initialize a Repository
2. Navigate to your project folder and initialize Git tracking:
cd MyProject
git init
git status
5. Viewing History
9. 1. View commit history:
git log
git diff
7. Useful Shortcuts
13. 1. Stage all changes and commit with one command: