"My code was working 5 minutes ago!" We've all been there. Version control is the time machine for developers.
Why Git?
Git allows you to track every change in your code. You can revert to previous versions, create branches to test new features, and collaborate with others without overwriting their work.
Essential Commands
Here are the commands I use every day in my terminal.
Terminal / Bash
# 1. Start a new repositorygit init# 2. Stage changesgit add .# 3. Save changesgit commit -m "Initial commit"# 4. Upload to GitHubgit push origin main