在FreeBSD 8.1下搭建Git服務器(2) |
發布時間: 2012/9/8 19:00:06 |
2、如何導入一個新的Git項目 (1)首先把自己介紹給git系統(QQ:小默862693539),比如自己的姓名和email地址,命令如下: git config--global user.name "Andrew.yu" git config--global user.email " yuhongchun027@163.com" (2)提交我的目錄/home/andrewyu/test進Git項目庫 cd /home/andrewy/test/ git init git add . git commit (3)這時候 大家可觀察我們的/home/andrewy/test的目錄 [root@research_jail ~/project]# ls -lsart total 8 2 -rw-r--r-- 1 root wheel 18 Apr 7 07:42 3 0 -rw-r--r-- 1 root wheel 0 Apr 7 07:42 2 0 -rw-r--r-- 1 root wheel 0 Apr 7 07:42 1 2 drwxr-xr-x 8 root wheel 512 Apr 7 07:42 .git 2 drwxr-xr-x 3 root wheel 512 Apr 7 07:43 . 2 drwxr-xr-x 4 root wheel 512 Apr 7 07:43 .. Git init命令可用于初始化當前所在目錄的這個項目,shell返回的提示表明已經建立了一個.git隱藏目錄來保存這個項目前的進展信息。 本文出自:億恩科技【www.vbseamall.com】 |