
Github Get Started in Git
🚀 Getting Started with GitHub
GitHub is a platform for hosting, sharing, and collaborating on code using Git. Follow this step-by-step guide to get started.
1️⃣ Create a GitHub Account
- Go to GitHub.com
- Click Sign Up and create an account.
- Verify your email and log in.
2️⃣ Install Git on Your Computer
🔹 Windows: Download from git-scm.com
🔹 Mac:
brew install git
🔹 Linux:
sudo apt install git # Debian/Ubuntusudo dnf install git # Fedora
Check installation:
git --version
3️⃣ Configure Git Locally
Set up your Git username and email (matches your GitHub account):
git config --global user.name "Your Name"git config --global user.email "your-email@example.com"
Check settings:
git config --list
4️⃣ Create a New Repository on GitHub
- Click the "+" icon → New repository.
- Enter a name (e.g.,
my-project
). - Choose Public or Private.
- Click Create repository.
5️⃣ Clone the Repository to Your Computer
Copy the repo’s HTTPS/SSH link from GitHub and run:
git clone https://github.com/your-username/my-project.gitcd my-project
6️⃣ Make Changes and Commit
- Create or modify a file, e.g.:
echo "Hello, GitHub!" > README.md
- Stage the changes:
git add README.md
- Commit the changes:
git commit -m "Added README file"
7️⃣ Push Changes to GitHub
Send the local commits to GitHub:
git push origin main
8️⃣ Work with Branches
Create a new branch:
git checkout -b feature-branch
After making changes, push the branch:
git push origin feature-branch
Create a Pull Request (PR) on GitHub to merge changes.
9️⃣ Keep Your Local Repo Updated
Fetch updates from GitHub:
git pull origin main
🔟 Collaborate with Others
- Fork repositories to work on someone else's project.
- Open Issues for bug tracking.
- Use GitHub Actions for automation.
🎯 Summary: GitHub Workflow
1️⃣ Sign up and install Git
2️⃣ Create a repository on GitHub
3️⃣ Clone it to your machine
4️⃣ Make changes and commit
5️⃣ Push to GitHub
6️⃣ Create branches & pull requests
7️⃣ Collaborate and deploy 🚀