添加文件跟踪
git add xx
移除文件跟踪
git rm xx
重命名文件跟踪
git mv old new
git log输出
git log //简要输出
git log -p //输出patch信息
git log -2 //显示最近再次提交的信息
git log --state//显示文件变动的简要信息
git log --pretty=oneline//每次commit只显示一行
git log --pretty=short //简要显示
git log --pretty=full //比short多一点
git log --pretty=fuller//比full更多一点
git log --graph //显示图形
git log --pretty=format
git log --pretty=format //格式化输出
git log --pretty=format:"%h - %an, %ar : %s"
参数:
Option Description of Output
%H Commit hash
%h Abbreviated commit hash
%T Tree hash
%t Abbreviated tree hash
%P Parent hashes
%p Abbreviated parent hashes
%an Author name
%ae Author email
%ad Author date (format respects the --date=option)
%ar Author date, relative
%cn Committer name
%ce Committer email
%cd Committer date
%cr Committer date, relative
%s Subject
since until
git log --since=2.weeks