This repository provides a simple walkthrough of Git β from installation to pushing your first repository to GitHub.
- Download Git from git-scm.com.
- Run the installer with default options.
- Open Git Bash to verify:
git --version
brew install gitsudo apt update
sudo apt install gitSet your Git identity:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"mkdir my-project
cd my-project
git initgit add .
git commit -m "Initial commit"- Create a new repo on GitHub (without a README).
- Add remote and push:
git remote add origin https://github.com/your-username/your-repo.git
git branch -M main
git push -u origin mainYour code is now live on GitHub!
#### π `.gitignore`
```gitignore
# Ignore node_modules, compiled files, OS-generated files, etc.
node_modules/
*.log
.DS_Store
*.pyc
.env
```