What is “Check-in”?
“Check-in” means:
- Saving changes locally (commit)
- Uploading them to GitHub (push)
🔹 Step-by-Step Using Git (Command Line)
Step 1: Open Project Folder
cd your-project-folder
Step 2: Initialize Git (if not already)
git init
Step 3: Add Files
git add .
➡ Adds all files to staging area
Step 4: Commit Changes
git commit -m "Initial commit"
➡ Saves changes locally
Step 5: Connect to GitHub Repository
git remote add origin https://github.com/username/repository.git
Step 6: Push Code to GitHub
git push -u origin main
🔹 For Existing Project (Update Code)
After making changes:
git add .
git commit -m "Updated code"
git push
🔹 Alternative: Using GitHub Desktop
- Open GitHub Desktop
- Select repository
- Add changes
- Click Commit
- Click Push
🔹 Important Commands Summary
| Command | Purpose |
|---|---|
git add . |
Stage files |
git commit -m "msg" |
Save changes |
git push |
Upload to GitHub |
🔹 Tips
- Write meaningful commit messages
- Commit frequently
- Pull latest changes before pushing (
git pull)
