天天看點

Ubuntu之Git更新

安裝了VS Code, 提示Git版本有些低,使用

git --version

指令檢視版本, 發現隻有 1.9.1, Git官方都出到2.12.2了, 希望更新一下, 但參照 Git Download for Linux and Unix 的指令:

sudo apt-get install git

, 更新不了. 參考 Upgrading Ubuntu to Use the Latest Git Version 的方法, 更新成功, 步驟如下:

# To get the very latest version of git, you need to add the PPA (Personal Package Archive) from the Ubuntu Git Maintainers Team to your Software Source list. Do that with the add-apt-repository command to add the PPA:

sudo add-apt-repository ppa:git-core/ppa

# Then update the source list and upgrade git:
sudo apt-get update
sudo apt-get install git
           

使用

git --version

指令檢驗, 更新到了2.11.0:

Ubuntu之Git更新