centOs創建git服務器和windows創建本地git的使用步驟

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

下載後就可以進行圖形界面的操作了



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章