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

来源:互联网 发布:java拆分字符串 编辑:程序博客网 时间:2024/05/29 13:06

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

下载后就可以进行图形界面的操作了



原创粉丝点击