博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
How to Install Git on CentOS 6
阅读量:7222 次
发布时间:2019-06-29

本文共 1911 字,大约阅读时间需要 6 分钟。

Introduction

Git is an open source, distributed version control system (VCS). It’s commonly used for source code management (SCM), with sites like GitHub offering a social coding experience, and popular projects such as Perl, Ruby on Rails, and the Linux kernel using it.

Pre-Flight Check

These instructions are intended for installing Git on CentOS 6.
I’ll be working from a Liquid Web Core Managed CentOS 6.5 server, and I’ll be logged in as root.

If you’re using CentOS 5, then refer to this tutorial on installing git from source on CentOS 5.

Installation

First, you’ll follow a simple best practice: ensuring the existing packages are up to date before installing anything new.

yum update

Then it’s a matter of just running one command for installation via yum:

yum install git

You’ll be asked to confirm the download and installation; simply enter y to confirm. Once this command is complete, git will be installed and ready to use!

As of the writing of this tutorial, the current version of Git available in the Liquid Web yum repositories is: git version 1.7.1. You can check the version of git that was installed by using the following command:

git --version

Configuration

To prevent any commit errors, it’s a good idea to setup your user for git. We’ll setup the user testuser with the e-mail address testuser@example.com .

git config --global user.name "testuser" (set user name for ervery repository)

git config --global user.email "testuser@example.com"

Next we’ll verify the configuration changes by viewing the .gitconfig . Since you may have been roaming around your server’s file system before starting this tutorial, use the cd command to return to your home directory:

cd

And then view the .gitconfig :

cat .gitconfig

You can also view the same details of your configuration by using the following command:

git config --list

Be Sociable, Share!

转载于:https://www.cnblogs.com/qike/p/4660148.html

你可能感兴趣的文章
数字货币交易系统火爆的背后是政策的大力支持
查看>>
gulp与webpack的区别
查看>>
ORA-12547:TNS:lost contact 问题分析思路
查看>>
解决firefox疯狂读硬盘的问题
查看>>
清华产业十大创新项目评选 新华三H3Cloud OS夺冠
查看>>
事务操作的统计,TPS的计算,隔离级别的读提交
查看>>
转贴:Ms Sql Server 2008 集成 SP1的方法!!!
查看>>
Memcache监控工具 -- memcache-top
查看>>
3-9 读写缓存流 ——BufferedStream类
查看>>
linux head
查看>>
Oracle osw监控工具的使用示例
查看>>
在Spring中整合JUnit单元测试
查看>>
Namenode双机热备之Pacemaker
查看>>
Xcode调试断点不停止解决方案!
查看>>
CentOS6.6+Puppet3.7.4分布式部署Nagios监控系统
查看>>
SQL Server 2008 存储结构之DCM、BCM
查看>>
asp.net2005里给控件重命名,提示“目录名无效”怎么解决
查看>>
Redis源码解析--Replication
查看>>
Java的多进程运行模式分析
查看>>
百度面试题:求绝对值最小的数
查看>>