一、软件的多维视图
二、软件的内部、外部质量指标
外部质量因素:可被用户感知
正确性、健壮性(鲁棒性)、可扩展性、可复用性、兼容性、性能、可移植性、易用性、功能性、及时性
内部质量因素:
源码方面:行数,逻辑复杂度
结构方面:耦合、内聚
代码可读性、易于理解、清晰、大小等等
三、软件配置管理SCM与版本控制系统VCS
Software Configuration Management (SCM) and Version Control System (VCS)
要注意这个基本变化的单元是以文件为单位的!!!
VCS版本控制系统
分为本地VCS、集中式VCS、分布式VCS
四、 Git的结构、工作原理和基本指令
A Git repository has three parts:
–
.git
directory (a repository storing all version control data)
本地的
CMDB
–
Working directory (local file system)
工作目录:本地文件系统
–
Staging area (in memory)
暂存区:隔离工作目录和
Git
仓库
Each file belongs to one of the following three states:
–
Modified (the file in working directory is different from the one in git repository, but is
not in staging area)
已修改
–
Staged (the file is modified and has been added into the staging area)
已暂存
–
Committed (the file keeps same in working directory and git directory)
已提交
Each node in the history graph is a commit a.k.a.
version a.k.a. revision of the project: a complete
snapshot of all the files at that point in time.
–
Except for the initial commit, each commit has a pointer to a parent commit.
每个
commit
指向一个父亲
–
Some commits have the same parent: they are versions that diverged from a common previous version.
多个commit指向同一个父亲:分支
–
Some commits have two parents: they are versions that tie divergent histories back together.
一个
commit 指向两个父亲:合并
▪
A
branch
is just a name that points to a commit.
每个分支仅仅是一个指针
▪
HEAD
points to the current commit.
–
We need to remember which branch we’re working on. So
HEAD
points to the current branch, which points to the current commit.
git每次只会存储发生变化的文件,未变化的无需重复存储
传统的VCS记录变化的基本单位是行,而Git是文件
Git的基本命令
git add
git status
git diff
git diff --cached
git commit
git commit -a (跳过暂存区,Git自动把所有已经跟踪过了的问价暂存起来一并提交,跳过了git
add的步骤)
git rm
git remote
git remote add URL
git fetch
git pull
git push origin master
git remote show origin
git remote rm
git checkout -b dev <=> git branch dev
git checkout dev
git merge dev
git branch -d dev(删除分支)