49 lines
1.5 KiB
Markdown
49 lines
1.5 KiB
Markdown
|
---
|
||
|
tags: ["git", "git-rebase"]
|
||
|
---
|
||
|
|
||
|
## C предварительной установкой старой версии из репозиториев
|
||
|
|
||
|
```
|
||
|
sudo apt update && sudo apt upgrade -y
|
||
|
sudo apt install -y --autoremove apt-transport-https ca-certificates curl make build-essential libssl-dev libghc-zlib-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip software-properties-common git
|
||
|
cd /usr/src
|
||
|
sudo git clone https://github.com/git/git.git git
|
||
|
cd git
|
||
|
sudo make prefix=/usr/local all
|
||
|
sudo make prefix=/usr/local install
|
||
|
git --version
|
||
|
```
|
||
|
|
||
|
## C предварительной распаковкой свежего релиза из архива
|
||
|
|
||
|
```
|
||
|
sudo apt update && sudo apt upgrade -y
|
||
|
sudo apt install -y --autoremove apt-transport-https ca-certificates curl make build-essential libssl-dev libghc-zlib-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip software-properties-common git
|
||
|
cd /usr/src
|
||
|
sudo wget -O https://github.com/git/git/archive/master.zip git.zip
|
||
|
sudo unzip git.zip
|
||
|
sudo rm -f git.zip
|
||
|
cd git-master
|
||
|
sudo make prefix=/usr/local all
|
||
|
sudo make prefix=/usr/local install
|
||
|
cd ..
|
||
|
sudo rm -rf git-master
|
||
|
git --version
|
||
|
sudo git clone https://github.com/git/git.git
|
||
|
```
|
||
|
|
||
|
### Centos
|
||
|
|
||
|
```
|
||
|
yum groupinstall "Development Tools"
|
||
|
yum install zlib-devel perl-ExtUtils-MakeMaker asciidoc xmlto openssl-devel
|
||
|
cd ~
|
||
|
wget -O git.zip https://github.com/git/git/archive/master.zip
|
||
|
unzip git.zip && cd git-master
|
||
|
make configure
|
||
|
./configure --prefix=/usr/local
|
||
|
make all doc
|
||
|
make install install-doc install-html
|
||
|
```
|