Git_Commands_Guide
Git_Commands_Guide
1. Git Setup
- Install Git:
Download from https://git-scm.com/ and install.
- Check Git Version:
git --version
- Set User Name:
git config --global user.name "Your Name"
- Set User Email:
git config --global user.email "[email protected]"
- View Configurations:
git config --list
2. Repository Management
- Initialize a Repository:
git init
- Check Repository Status:
git status
- Add Files to Staging:
git add . # Adds all files
- Commit Changes:
git commit -m "Your commit message"
- View Commit History:
git log
5. Undoing Changes
6. Additional Commands