Git Installation और Setup
In this page:
Windows पर Install करना
Windows पर, git-scm.com से official installer download करें; यह Git Bash bundle करता है, एक Unix-style terminal emulator, इसलिए आपको वही command syntax मिलता है जो हर Git tutorial में और macOS या Linux पर developers इस्तेमाल करते हैं।
उदाहरण: Installing on Windows
winget install --id Git.Git -e --source winget
macOS पर Install करना
macOS पर, Git आमतौर पर एक अलग installer के बजाय Xcode Command Line Tools के through आता है -- Terminal खोलें, कोई भी git command चलाएँ, और अगर वे missing हों तो macOS automatically tools install करने के लिए prompt करेगा।
उदाहरण: Installing on macOS
xcode-select --install
Linux पर Install करना
Linux पर, Git आपके distribution के package manager से आता है, इसलिए exact command आपके flavor पर depend करती है: Debian/Ubuntu पर apt install git, Red Hat/CentOS/Fedora पर yum install git (या dnf)।
उदाहरण: Installing on Linux
sudo apt install git
sudo yum install git
Git Bash या Terminal खोलना
एक बार installed होने पर, सभी Git commands एक terminal-style interface में type किए जाते हैं -- Windows पर Git Bash, या macOS और Linux पर built-in Terminal app -- क्योंकि Git का खुद default रूप से कोई graphical interface नहीं है।
उदाहरण: Opening Git Bash or Terminal
git help
Initial Verification
install करने के बाद, यह confirm करने के लिए एक quick version check चलाना उचित है कि Git binary आपके terminal से reachable है; अभी एक broken PATH पकड़ना बाद में एक mysterious 'command not found' error debug करने से कहीं कम confusing है।
उदाहरण: Initial Verification
git --version
- Git install करना और फिर पहले से खुले एक terminal में
gitचलाना,command not foundपाना क्योंकि नया PATH देखने के लिए terminal को restart करना ज़रूरी है। - install करने के बाद
git --versionसे check skip करना, ताकि पहला command fail होने तक एक failed या partial install unnoticed रहे। - एक similar नाम वाला अलग package install करना, जैसे सिर्फ
gitचाहिए होने परapt install git-all, कई extra tools खींचते हुए।
Chapter Quiz — Complete all 7 topics to unlock
0/7 topics done
Complete these topics first: