Git Product home page Git Product logo

install-git-on-ubuntu's Introduction

所為何來

於 Ubuntu 上安裝 Git 版本管理系統,並方便使用 Git 之資源。

使用環境

Ubuntu 12.04 Server
Git 1.8.3.4

推薦安裝方式

於終端機中,先輸入以下指令,以安裝 Git 所需的相關套件:

sudo aptitude install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev build-essential

接著,輸入以下指令,以將 Git 下載並安裝:
(Git 的版本可至 Git 官網 查看與選擇,本文以 1.8.3.4 做為示範)

wget https://git-core.googlecode.com/files/git-1.8.4.tar.gz && 
tar -zxf git-1.8.4.tar.gz && mv git-1.8.4 git && cd git && 
make prefix=/usr/local all && sudo make prefix=/usr/local install && 
cd && rm -rf git git-1.8.4.tar.gz

最後,請設定帳號名稱及 Email:
(本文以 git.user 做為帳號、git@email.com 做為 Email)

git config --global user.name "git.user" && 
git config --global user.email [email protected]

欲修改時,請再次輸入以上帳號或 Email 之指令,即可覆蓋原設定。

DONE.

補充說明

日後需更新 Git 時,可使用 Git 的指令來進行:

git clone git://git.kernel.org/pub/scm/git/git.git && 
cd git && make prefix=/usr/local all && sudo make prefix=/usr/local install &&
cd && rm -rf git

欲查看帳號及 Email 設定時,可輸入:

git config --list

若要直接編輯的話,可使用:

sudo nano ~/.gitconfig

參考資源

install-git-on-ubuntu's People

Contributors

meyu avatar

Watchers

李孟諭 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.