在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.enkj.com】 |