## 從源代碼開始安裝
如果你在一個其基于Unix的系統中,你可以從Git的官網上[Git Download Page](http://git-scm.com/download)下載它的源代碼,并運行像下面的幾行命令,你就可以安裝:
~~~
$ make prefix=/usr all ;# as yourself
$ make prefix=/usr install ;# 以root權限運行
~~~
你需一些庫:?[expat](http://expat.sourceforge.net/),[curl](http://curl.linux-mirror.org/),?[zlib](http://www.zlib.net/), 和?[openssl](http://www.openssl.org/); 除了expat 外,其它的可能在你的機器上都安裝了。
## Linux
如果你用的是Linux,你可以用你的本地包管理系統(native package management system)來安裝.
~~~
$ yum install git-core #譯者注,在redhat等系統下用yum
$ apt-get install git-core #譯者注,在debian, ubuntu等系統下用apt-get
~~~
如果你用上面的命令不起作用的話,你可以從下面兩個站點下載 .deb 或 .rpm 包:
[RPM Packages](http://kernel.org/pub/software/scm/git/RPMS/)
[Stable Debs](http://www.backports.org/debian/pool/main/g/git-core/)
如果你在Linux興趣從源代碼開始安裝的話,下面的這篇文章也許對你有幫助:?[Article: Installing Git on Ubuntu](http://chrisolsen.org/2008/03/10/installing-git-on-ubuntu/)
## Mac 10.4
在Mac10.4和 10.5,如果你安裝了MacPorts,你可以通過?[MacPorts](http://www.macports.org/)來安裝Git。如果你沒有安裝MacPort, 你可以從?[這里](http://www.macports.org/install.php)來安裝它.
當你安裝好MacPorts后,你可通過下面的命令來安裝:
~~~
$ sudo port install git-core
~~~
如果你想從源代碼開始安裝,下面這些文章可能對你有幫助:
[Article: Installing Git on Tiger](http://rails.wincent.com/wiki/Installing_Git_1.5.2.3_on_Mac_OS_X_Tiger)
[Article: Installing Git and git-svn on Tiger from source](http://larrytheliquid.com/2007/12/29/compiling-git-and-git-svn-on-osx-tiger/)
## Mac 10.5
在Leopard系統下,你也可以通過MacPorts來安裝,但是你有一個新的選項:"一個漂亮的安裝包", 你可以從這里來下載:[Git OSX Installer](http://code.google.com/p/git-osx-installer/downloads/list?can=3)
如果你想從源代碼開始安裝,我希望下面些資料能對你有幫助:
[Article: Installing Git on OSX Leopard](http://solutions.treypiepmeier.com/2008/02/25/installing-git-on-os-x-leopard/)
[Article: Installing Git on OS 10.5](http://dysinger.net/2007/12/30/installing-git-on-mac-os-x-105-leopard/)
## Windows
在Windows下安裝Git是很簡單的,你只要下載[msysGit](http://code.google.com/p/msysgit/downloads/list)就可以了。
_Git on Windows_?這一章有一個"screencast"來在演示如何在windows下使用Git。
- 1. 介紹
- 歡迎使用Git
- GIT對象模型
- Git目錄 與 工作目錄
- Git索引
- 2. 第一步
- 安裝Git
- 安裝與初始化
- 3. 基本用法
- 獲得一個Git倉庫
- 正常的工作流程
- 分支與合并@基礎
- 查看歷史 -Git日志
- 比較提交 - Git Diff
- 分布式的工作流程
- Git標簽
- 4. 中級技能
- 忽略某些文件
- rebase
- 交互式rebase
- 交互式添加
- 儲藏
- Git樹名
- 追蹤分支
- 使用Git Grep進行搜索
- Git的撤消操作 - 重置, 簽出 和 撤消
- 維護Git
- 建立一個公共倉庫
- 建立一個私有倉庫
- 5. 高級技能
- 創建新的空分支
- 修改你的歷史
- 高級分支與合并
- 查找問題的利器 - Git Bisect
- 查找問題的利器 - Git Blame
- Git和Email
- 定制Git
- Git Hooks
- 找回丟失的對象
- 子模塊
- 6. Git生態體系
- Git 與之 Windows
- 使用Git進行系統部署
- 與 Subversion 集成
- 從其他代碼管理工具遷移到Git
- 圖形化的Git
- Git倉庫托管
- Git的其它用法
- Git的腳本支持
- Git 與編輯器
- 7. 原理解析
- Git是如何存儲對象的
- 查看Git對象
- Git引用
- Git索引
- 打包文件
- 更底層的Git
- 傳輸協議
- 術語表