जानें कि अपने GitHub रिपॉज़िटरी को कैसे कनेक्ट करें और अपने मोबाइल पर Pocket Code से सीधे कोड कैसे प्रबंधित करें।
पहले मोबाइल से रिपॉज़िटरी प्रबंधित करना जटिल हुआ करता था। Pocket Code के साथ, यह डेस्कटॉप जितना ही आसान है।
हो गया! अब आप अपनी सभी रिपॉज़िटरी तक पहुँच सकते हैं।
क्लोन करने के तीन तरीके हैं:
विकल्प A: ऐप से
1. होम स्क्रीन पर "+" बटन पर टैप करें
2. "Clone Repository" चुनें
3. URL खोजें या पेस्ट करें
4. लोकल स्थान चुनें
विकल्प B: ब्राउज़र से
1. GitHub Mobile में रिपॉज़िटरी खोलें
2. "Share" पर टैप करें
3. "Open with Pocket Code" चुनें
विकल्प C: Git कमांड के साथ
git clone https://github.com/username/repo.git
# स्थिति देखें
git status
# बदलाव जोड़ें
git add .
# कमिट करें
git commit -m "Fix: correct login bug"
# पुश करें
git push origin main
या विज़ुअल इंटरफ़ेस का उपयोग करें:
# ब्रांच देखें
git branch
# ब्रांच बनाएँ
git checkout -b feature/new-functionality
# ब्रांच बदलें
git checkout main
# मर्ज करें
git merge feature/new-functionality
जब कॉन्फ्लिक्ट हों:
# मैन्युअल रूप से हल करने के बाद
git add conflict-file.js
git commit -m "Resolve conflict in conflict-file.js"
बदलावों को अस्थायी रूप से सहेजें:
# बदलाव सहेजें
git stash
# स्टैश देखें
git stash list
# बदलाव वापस लाएँ
git stash pop
# 1. सुनिश्चित करें कि आप main पर हैं
git checkout main
# 2. नवीनतम बदलाव पुल करें
git pull
# 3. फ़िक्स करें
# ... फ़ाइलें संपादित करें ...
# 4. कमिट और पुश करें
git add .
git commit -m "Fix: urgent production bug"
git push
# 1. main से ब्रांच बनाएँ
git checkout main
git pull
git checkout -b feature/new-api
# 2. विकसित करें
# ... सुविधा लागू करें ...
# 3. बार-बार कमिट करें
git add .
git commit -m "feat: add /api/users endpoint"
# 4. पुश करें और PR बनाएँ
git push -u origin feature/new-api
# फिर ऐप से PR बनाएँ
# 1. production से ब्रांच बनाएँ
git checkout production
git checkout -b hotfix/critical-bug
# 2. त्वरित फ़िक्स
# ... फ़िक्स ...
# 3. कमिट करें और सीधे मर्ज करें
git add .
git commit -m "hotfix: fix critical error"
git checkout production
git merge hotfix/critical-bug
git push
✅ अच्छे संदेश:
feat: add Google login
fix: correct email validation
docs: update README with instructions
refactor: simplify search function
❌ बुरे संदेश:
changes
fix
wip
asdfgh
वर्णनात्मक नामों का उपयोग करें:
feature/feature-namefix/bug-descriptionhotfix/critical-issuerefactor/refactor-nameहर बार प्रमाणीकरण से बचने के लिए:
[email protected]:user/repo.gitफ़ाइलों को अनदेखा करने के लिए एक .gitignore बनाएँ:
# Dependencies
node_modules/
venv/
__pycache__/
# Build outputs
dist/
build/
*.pyc
# Environment
.env
.env.local
# IDE
.vscode/
.idea/
# OS
.DS_Store
Thumbs.db
कार्यों को स्वचालित करें:
# .git/hooks/pre-commit
#!/bin/sh
npm run lint
npm test
# पहले पुल करें
git pull origin main
# यदि कोई कॉन्फ्लिक्ट हो तो हल करें
# फिर पुश करें
git push
जाँचें:
# सत्यापित करें कि आपने पुश किया है
git status
# यदि यह "Your branch is ahead" कहता है
git push
Pocket Code के साथ आपके मोबाइल पर Git और GitHub की पूरी शक्ति है। उस ज़रूरी कमिट को न करने का अब कोई बहाना नहीं।
अगला ट्यूटोरियल: Vercel के साथ GitHub से स्वचालित डिप्लॉय
प्रश्न हैं? हमारे Discord से जुड़ें
हैप्पी कोडिंग! 🚀
ऐप डाउनलोड करें और अपने फ़ोन से कोडिंग शुरू करें।