Git (Learning II) compiling the installation

Source: Internet
Author: User
Tags using git git commands




Git Learning Notes
#####################################################
qq:1218761836
QQ Group: 150181442
#####################################################

git installation
1. Yum Install git
Yum Install Git–y
Yum install-y git-email Git-gui gitk git-svn Git-cvs
Where GIT-SVN Git-cvs is required to support SVN CVS co-operation (selectable)
2. Turn on git command completion (but I can do it without this test)
. /etc/bash_completion.d/git or Source/etc/bash_completion.d/git
#运行此命令后即可在服务器上使用git的命令补齐功能. To be able to load the Bash_completion script automatically when the terminal is turned on, you need to add the following in the system configuration file/etc/profile and the local configuration file ~/.BASHRC.
#add git
if [-f/etc/bash_completion.d/git]; Then
. /etc/bash_completion.d/git
Fi
Of course, the/etc/bash_completion.d/git git script here can also copy the source file substitution,
cp/usr/share/doc/git-1.7.1/contrib/completion/git-completion.bash/etc/bash_completion.d/
Then replace the git in the file with Git-completion.bash.
Reference: Http://git-scm.com/download/linux
Compiling the installation
Compiling the installation requires the installation of some git-required libraries
Yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc* \
Perl perl-devel Texinfo Xmlto-y
In order to be able to add more formats to a document (such as Doc,html,info), you need to install the dependent packages
Yum Install AsciiDoc xmlto-y
DOCBOOK2X This library requires additional installation
wget http://centos.karan.org/el5/extras/testing/i386/RPMS/docbook2X-0.8.8-1.el5.kb.i386.rpm
RPM-IVH Docbook2x-0.8.8-1.el5.kb.i386.rpm–nodeps
cd/usr/bin/
Ln-s Db2x_docbook2texi Docbook2x-texi
ll Docbook2x-texi
Get the source package:
https://www.kernel.org/pub/software/scm/git/
Https://github.com/git/git/releases
This is usually the latest version on GitHub, but the kernel.org contains a file download signature, which is used if you want to verify that the download is correct.
wget https://www.kernel.org/pub/software/scm/git/git-2.5.0.tar.gz
Tar xvf git-2.5.0.tar.gz-c/usr/local/src/
[[email protected] git-2.5.0]# less INSTALL
Git Installation

Normally you can just do ' make ' followed by ' make install ', and that
Would install the GIT programs in your own ~/bin/directory. If you want
To does a global install, you can do

$ make prefix=/usr all DOC info; # as yourself
# make PREFIX=/USR install Install-doc install-html install-info; # as Root

(or prefix=/usr/local, of course). Just Like any program suite
That uses $prefix, the built results has some paths encoded,
Which is derived from $prefix, so "do all; Make PREFIX=/USR
Install "would not work.

The beginning of the Makefile documents many variables that affect the
Git is built. You can override them either from the command line, or in a
Config.mak file.

Alternatively you can use autoconf generated./configure script to
Set up install paths (via Config.mak.autogen), so can write instead

$ make configure; # as Yourself
$./configure--prefix=/usr; # as yourself
$ make all doc; # as yourself
# make install Install-doc install-html;# as root

..............................................................................................................................................
[email protected] git-2.5.0]# make configure
Git_version = 2.5.0
GEN Configure
[[email protected] git-2.5.0]#./CONFIGURE–HELP # View installed parameters

[Email protected] git-2.5.0]#/configure--prefix=/application/git
[[email protected] git-2.5.0]# make all DOC info
[[email protected] git-2.5.0]# make install Install-doc install-html install-info
......................................................................................................................... ........
MAKE[1]: Leaving directory '/usr/local/src/git-2.5.0/documentation '
Make-c Documentation Install-info
MAKE[1]: Entering directory '/usr/local/src/git-2.5.0/documentation '
MAKE[2]: Entering directory '/usr/local/src/git-2.5.0 '
MAKE[2]: ' Git-version-file ' is up to date.
MAKE[2]: Leaving directory '/usr/local/src/git-2.5.0 '
Install-d-M 755/application/git/share/info
Install-m 644 Git.info Gitman.info/application/git/share/info
If Test-r/application/git/share/info/dir; Then \
Install-info--info-dir=/application/git/share/info Git.info;
Install-info--info-dir=/application/git/share/info Gitman.info;
else \
echo "No directory found In/application/git/share/info" >&2; \
Fi
No Directory found In/application/git/share/info
MAKE[1]: Leaving directory '/usr/local/src/git-2.5.0/documentation '


Man git view instructions for using GIT commands

[[email protected] ~]# man git
Git (1) git Manual git (1)

NAME
Git-the Stupid content Tracker

Synopsis
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]

DESCRIPTION
Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both
High-level operations and full access to internals.

See Gittutorial (7) to get started, then see everyday git[1] for a useful minimum set of commands, and ' Man
Git-commandname "for documentation in each command. CVS users may also want to read gitcvs-migration (7). See the Git
User ' s manual[2] for a more in-depth introduction.

The COMMAND is either a, a name of a Git COMMAND (see below), or an alias as defined in the configuration file (see git-
Config (1)).

Formatted and hyperlinked version of the latest Git documentation can be viewed at
http://www.kernel.org/pub/software/scm/git/docs/. Online documentation for #man git

......................................................................................................................... .............................................






Note: You may encounter errors when compiling, if you encounter the following failure

Make when the most error and dependency on the package has a problem, if the corresponding dependency package installed, compile easily

Error One
/bin/sh:line 1:xmlto:command not found
MAKE[1]: * * * [Git-add.1] Error 127
MAKE[1]: Leaving directory '/usr/local/src/git-1.7.12.3/documentation '
Make: * * * [Install-doc] Error 2

Problems with package dependencies
Yum Install-y Xmlto

Error two
/bin/sh:line 1:docbook2x-texi:command not found
MAKE[1]: * * * [User-manual.texi] Error 127
MAKE[1]: Leaving directory '/usr/local/src/git-1.7.12.3/documentation '
Make: * * * [Install-info] Error 2

Git full installation requires asciidoc,docbook2x
Yum install-y openjade Texinfo perl-xml-sax
Cd/usr/local/src
wget http://centos.karan.org/el5/extras/testing/i386/RPMS/docbook2X-0.8.8-1.el5.kb.i386.rpm
RPM-IVH docbook2x-0.8.8-1.el5.kb.i386.rpm--nodeps
Cd/usr/bin
Ln-s Db2x_docbook2texi Docbook2x-texi



This article is from the "Little Rookie" blog, please be sure to keep this source http://xiaocainiaox.blog.51cto.com/4484443/1698634

Git (Learning II) compiling the installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.