您的位置:首页 > 运维架构 > Linux

centOs创建git服务器和windows创建本地git的使用步骤

2017-05-17 22:54 501 查看
1.centos安装git

yum install git

安装成功,运行

git --version

2.服务器创建git项目

 创建git工作目录

 在 /usr/common/下创建

[root@VM_54_176_centos usr]# mkdir common

[root@VM_54_176_centos usr]# ls

bin     etc    include  lib64    local  share  tmp

common  games  lib      libexec  sbin   src

[root@VM_54_176_centos usr]# cd common

[root@VM_54_176_centos common]# mkdir gitrepo

[root@VM_54_176_centos common]# cd gitrepo

[root@VM_54_176_centos gitrepo]# mkdir project1

[root@VM_54_176_centos gitrepo]# cd progect1

-bash: cd: progect1: No such file or directory

[root@VM_54_176_centos gitrepo]# cd project1

[root@VM_54_176_centos project1]# git init --bare

git init --bare 这条命令就是在git下创建git工作目录

3.window下的使用

3.1 安装msysGit

msysGit是git在系统中的注册信息,能执行Git的shell命令

下载地址:https://code.google.com/p/msysgit/

3.2 安装TortoiseGit

TortoiseGit是git的图形化界面,在本地操作git主要用这个,如果未安装msysGit或其他shell版本的git,这msysGit不可用

下载地址:  https://code.gogle.com/p/tortoisegit/wiki/download

下载后就可以进行图形界面的操作了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  git centos
相关文章推荐