- Mobile DevOps
- Rohin Tak Jhalak Modi
- 158字
- 2025-04-04 17:14:05
Installing Git on Ubuntu/Debian systems
To install Git on Ubuntu systems, follow these steps:
- From your shell, install Git using the apt-get command:
$ sudo apt-get update $ sudo apt-get install git
- Verify the installation was successful by typing git --version:
$ git --version git version 2.9.2
- Configure your Git username and email for a single repository:
$ git config --global user.name "firstname lastname" $ git config --global user.email "email@gmail.com"
- Install the necessary dependencies using the apt-get command:
$ apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev asciidoc xmlto docbook2x
- Clone the Git source (or if you don't yet have a version of Git installed, download and extract it):
$ git clone https://git.kernel.org/pub/scm/git/git.git
- To build the Git source and install it under /usr, run make:
$ make all doc info prefix=/usr $ sudo make install install-doc install-html install-info install-man prefix=/usr
With this, we have discussed installing and configuring Git on different platforms, including Windows, CentOS, and Linux systems.