2013年8月8日 星期四

[研究] Git 1.7.1 安裝 (CentOS 6.4 x64)

[研究] Git 1.7.1 安裝 (CentOS 6.4 x64)

Git 是分散式版本控制軟體

(下圖)本機端版本控制
http://git-scm.com/figures/18333fig0101-tn.png


(下圖)集中式版本控制
http://git-scm.com/figures/18333fig0102-tn.png


(下圖)分散式版本控制
http://git-scm.com/figures/18333fig0103-tn.png


(下圖)一般版本控制是紀錄每個檔案原始狀態和差異
http://git-scm.com/figures/18333fig0104-tn.png


(下圖) Git 紀錄每個檔案的完整版本,而非只有差異
http://git-scm.com/figures/18333fig0105-tn.png


簡介
http://zh.wikipedia.org/wiki/Gits

官方網站
http://git-scm.com/

安裝參考
http://git-scm.com/book/en/Getting-Started-Installing-Git

yum 可安裝的 Git 相關套件

[root@localhost ~]# yum list | grep git
...(略)
git.x86_64                             1.7.1-3.el6_4.1                   updates
git-all.noarch                         1.7.1-3.el6_4.1                   updates
git-cvs.noarch                         1.7.1-3.el6_4.1                   updates
git-daemon.x86_64                      1.7.1-3.el6_4.1                   updates
git-email.noarch                       1.7.1-3.el6_4.1                   updates
git-gui.noarch                         1.7.1-3.el6_4.1                   updates
git-svn.noarch                         1.7.1-3.el6_4.1                   updates
gitk.noarch                            1.7.1-3.el6_4.1                   updates
gitweb.noarch                          1.7.1-3.el6_4.1                   updates
...(略)

[root@localhost ~]# yum search git
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: ftp.cs.pu.edu.tw
 * extras: centos.ustc.edu.cn
 * updates: centos.ustc.edu.cn
=============================================================================================== N/S Matched: git ===============================================================================================
emacs-git.noarch : Git version control system support for Emacs
emacs-git-el.noarch : Elisp source files for git version control system support for Emacs
git-all.noarch : Meta-package to pull in all git tools
git-cvs.noarch : Git tools for importing CVS repositories
git-daemon.x86_64 : Git protocol dæmon
git-email.noarch : Git tools for sending email
git-gui.noarch : Git GUI tool
git-svn.noarch : Git tools for importing Subversion repositories
gitk.noarch : Git revision tree visualiser
gitweb.noarch : Simple web interface to git repositories
perl-Git.noarch : Perl interface to Git
cdparanoia.x86_64 : A Compact Disc Digital Audio (CDDA) extraction tool (or ripper).
dcraw.x86_64 : Tool for decoding raw image data from digital cameras
git.x86_64 : Fast Version Control System
icedax.x86_64 : A utility for sampling/copying .wav files from digital audio CDs
kacst-digital-fonts.noarch : Fonts for arabic from arabeyes project
libdc1394.i686 : 1394-based digital camera control library
libdc1394.x86_64 : 1394-based digital camera control library
libdv-tools.x86_64 : Basic tools to manipulate Digital Video streams
libgphoto2.i686 : Library for accessing digital cameras
libgphoto2.x86_64 : Library for accessing digital cameras
python-Coherence.noarch : Python framework to participate in digital living networks

  Name and summary matches only, use "search all" for everything.
[root@localhost ~]#

安裝
yum -y install git*

測試

[root@localhost ~]# git
usage: git [--version] [--exec-path[=GIT_EXEC_PATH]] [--html-path]
           [-p|--paginate|--no-pager] [--no-replace-objects]
           [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE]
           [--help] COMMAND [ARGS]

The most commonly used git commands are:
   add        Add file contents to the index
   bisect     Find by binary search the change that introduced a bug
   branch     List, create, or delete branches
   checkout   Checkout a branch or paths to the working tree
   clone      Clone a repository into a new directory
   commit     Record changes to the repository
   diff       Show changes between commits, commit and working tree, etc
   fetch      Download objects and refs from another repository
   grep       Print lines matching a pattern
   init       Create an empty git repository or reinitialize an existing one
   log        Show commit logs
   merge      Join two or more development histories together
   mv         Move or rename a file, a directory, or a symlink
   pull       Fetch from and merge with another repository or a local branch
   push       Update remote refs along with associated objects
   rebase     Forward-port local commits to the updated upstream head
   reset      Reset current HEAD to the specified state
   rm         Remove files from the working tree and from the index
   show       Show various types of objects
   status     Show the working tree status
   tag        Create, list, delete or verify a tag object signed with GPG

See 'git help COMMAND' for more information on a specific command.

[root@localhost ~]# git --version
git version 1.7.1
[root@localhost ~]#

除了命令列環境,也有 GUI 環境可用


(待續...)

[研究] Git 1.8.3.1 安裝 (CentOS 7.0 x86_64)
http://shaurong.blogspot.com/2014/08/git-1831-centos-70-x8664.html

[研究] Git 1.7.1 安裝 (CentOS 6.4 x64)
http://shaurong.blogspot.com/2013/08/git-171-centos-64-x64.html

沒有留言:

張貼留言