git命令操作
$ work % cd workspace
$ workspace % mkdir WebService //创建文件夹
$ workspace % git init //初始化
Initialized empty Git repository in /Users/jack/work/workspace/.git/
$ workspace %
$ workspace % cd .git
$ .git % ls
HEAD branches config description hooks info objects refs
$ .git % ls -l
total 24
-rw-r--r-- 1 jack staff 23 Sep 25 22:16 HEAD
drwxr-xr-x 2 jack staff 64 Sep 25 22:16 branches
-rw-r--r-- 1 jack staff 137 Sep 25 22:16 config
-rw-r--r-- 1 jack staff 73 Sep 25 22:16 description
drwxr-xr-x 13 jack staff 416 Sep 25 22:16 hooks
drwxr-xr-x 3 jack staff 96 Sep 25 22:16 info
drwxr-xr-x 4 jack staff 128 Sep 25 22:16 objects
drwxr-xr-x 4 jack staff 128 Sep 25 22:16 refs
$ .git %
注意:.git目录中的文件不要删除也不要修改,否则git不能正常工作。
在版本控制过程中,使用多条线同时推进多个任务。