1. 程式人生 > >fedora27(以及其他linux/unix)安裝git

fedora27(以及其他linux/unix)安裝git

Fedora安裝GIT

$ yum install git (up to Fedora 21)   
$ dnf install git (Fedora 22 and later)

然後有說進入git資料夾執行下面程式碼的:

$ make prefix=/usr/local all
$ sudo make prefix=/usr/local install

之後直接開啟命令列,切換到需要clone的目錄(可以設定使得在資料夾下右鍵有在當前目錄下開啟終端的選項)

$ git clone url

其他linux安裝git:

Debian/Ubuntu

  • For the latest stable version for your release of Debian/Ubuntu
$ apt-get install git
  • For Ubuntu, this PPA provides the latest stable upstream Git version
$ add-apt-repository ppa:git-core/ppa # apt update; apt install git

Gentoo

$ emerge --ask --verbose dev-vcs/git

Arch Linux

$ pacman -S git

openSUSE

$ zypper install git

Mageia

$ urpmi git

Nix/NixOS

$ nix-env -i git

FreeBSD

$ pkg install git

Solaris 9/10/11 (OpenCSW)

$ pkgutil -i git

Solaris 11 Express

$ pkg install developer/versioning/git

OpenBSD

$ pkg_add git

Alpine

$ apk add git

Red Hat Enterprise Linux, Oracle Linux, CentOS, Scientific Linux, et al.
RHEL and derivatives typically ship older versions of git. You can download a tarball and build from source, or use a 3rd-party repository such as the IUS Community Project to obtain a more recent version of git.

Slitaz

$ tazpkg get-install git