इस लेख में मैं आपको दिखाऊंगा कि उबंटू सर्वर या कंप्यूटर पर जीआईटी कैसे स्थापित करें।
संभावना है कि आपके पास पहले से ही GIT पहले से इंस्टॉल है। इसलिए उबंटू पर Git इंस्टॉल करने का प्रयास करने से पहले सुनिश्चित करें कि यह पहले से इंस्टॉल नहीं है। टर्मिनल खोलें और टाइप करें:
$ git --version git version 2.34.1
यदि आउटपुट गिट का संस्करण दिखाता है तो आप भाग्यशाली हैं और गिट आपके उबंटू मशीन पर पहले से ही स्थापित है। आप गिट का उपयोग शुरू कर सकते हैं!
एपीटी के माध्यम से गिट स्थापित करना
If command “git –version” shows error “Command ‘git’ not found” then you need to install git. Use APT package manager to perform the installation.
$ sudo apt install git The following NEW packages will be installed: git After this operation, 18,9 MB of additional disk space will be used. Get:1 http://ua.archive.ubuntu.com/ubuntu jammy-updates/main amd64 git amd64 1:2.34.1-1ubuntu1.10 [3 166 kB] Fetched 3 166 kB in 1s (4 297 kB/s) Selecting previously unselected package git. (Reading database ... 402237 files and directories currently installed.) Preparing to unpack .../git_1%3a2.34.1-1ubuntu1.10_amd64.deb ... Unpacking git (1:2.34.1-1ubuntu1.10) ... Setting up git (1:2.34.1-1ubuntu1.10) ...
आइए जांचें कि git पैकेज सही ढंग से स्थापित है या नहीं।
$ git --version git version 2.34.1
That’s it. You can start using git. Did you expect more steps?
Suggested packages – which do you need?
इंस्टॉल के लिए अतिरिक्त पैकेज सुझाए गए हैं: git-daemon-run, git-daemon-sysvinit git-doc git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn। वे क्या प्रदान करते हैं
गिट-डेमन-रन क्या है?
git-daemon-run पर एक त्वरित Google खोज से पता चलता है कि स्वयं के Git सर्वर को चलाने के लिए git को ख़राब करना संभव है। यदि आप सहयोग के लिए अपने स्थानीय Git रिपॉजिटरी को नेटवर्क पर पहुंच योग्य बनाना चाहते हैं तो git-daemon आपके लिए उपयोगी हो सकता है।

You do not need a Git daemon if you don’t plan to run own Git server. And if you plan to run own Git server – there are better options than a git-daemon, such as गिटोलाइट, gitea या समान.
गिट-डॉक क्या है?
आइए पैकेज के बारे में जानकारी के लिए रिपॉजिटरी से पूछताछ करें:
$ sudo apt show git-doc Package: git-doc Version: 1:2.34.1-1ubuntu1.10 Priority: optional ... omitting lines with info about developers ... This package provides the documentation
As you can see git-doc package provides documentation. You don’t need to install it since all the गिट दस्तावेज़ीकरण आपको आवश्यकता हो सकती है ऑनलाइन उपलब्ध है।
गिट-ईमेल पैकेज क्या है?
Lets run the same “apt show” trick with the git-email package.
$ sudo apt show git-email Package: git-email Version: 1:2.34.1-1ubuntu1.10 Priority: optional This package provides the git-send-email program for sending series of patch emails.
कुछ मामलों में पैच को ईमेल के रूप में भेजना उपयोगी हो सकता है। इसलिए यदि आप सक्रिय रूप से जीआईटी का विकास और उपयोग कर रहे हैं तो यह पैकेज काम आ सकता है।
You don’t need extra packages to use GIT
एक बार git इंस्टॉल हो जाए तो आगे बढ़ें और इसका उपयोग शुरू करें। गिट सीखने का अभ्यास से बेहतर कोई तरीका नहीं है। एक खाली रिपॉजिटरी बनाएं या जीथब से मौजूदा रिपॉजिटरी को क्लोन करें और कोडिंग शुरू करें!
नीचे दिया गया आदेश वर्तमान निर्देशिका में एक Git रिपॉजिटरी आरंभ करेगा।
$ git init Initialized empty Git repository in /home/gitproject/.git/
And to clone an existing repository from Github use “git clone REPO_URL” command. For example:
$ git clone https://github.com/EugeneWHZ/canvaslms-ansible-installation.git Cloning into 'canvaslms-ansible-installation'... remote: Enumerating objects: 66, done. remote: Total 66 (delta 0), reused 0 (delta 0), pack-reused 66 Receiving objects: 100% (66/66), 13.81 KiB | 589.00 KiB/s, done. Resolving deltas: 100% (10/10), done.
Conclusion: use version control, it’s easy!
Git इंस्टॉल करें और अपने जीवन में संस्करण नियंत्रण जोड़ें। आप इसके लिए बाद में स्वयं को धन्यवाद देंगे।






