环境配置-git

来源:互联网 发布:linux 虚拟机内存占用 编辑:程序博客网 时间:2024/05/13 19:41

1.简介
Git是一款免费, 开源的分布式版本控制系统

2.Git基础配置
1)配置用户名(提交时会引用)
git config –global user.name “username”
2)配置邮箱
config –global user.email “xxxx@xxx”
3)其他配置
git config –global core.autocrlf false
#让Git不要管win/linux换行符转换的事
4)编码配置
#避免Git gui中的中文乱码
git config –global gui.encoding utf-8
#避免git status 显示中文文件名乱码
git config –global core.quotepath off
#window 下同时执行如下命令
git config –global core.ignorecase false

3.安装
1)安装依赖

 sudo yum -y install zlib-devel openssl-devel cpio expat-devel gettext-devel curl-devel perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker

2)解压 tar文件
3)执行make命令

sudo make prefix=/usr/local allsudo make prefix=/usr/local install

4)验证
git –version

4.连接github
1)生成秘钥:
$ ssh-keygen -t rsa -C “youremail@example.com”
2)进入秘钥安装的目录中打开pub秘钥,进行连接

这里写图片描述

原创粉丝点击