# learngit **Repository Path**: azure2u/learngit ## Basic Information - **Project Name**: learngit - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2017-08-20 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README file-->git-add-->stage(缓存区)-->git-commit-->master(存储区) git-add后未git-commit情况下继续修改file,然后git-commit操作提交的是存在缓存区的文件版本,不是刚刚修改后的file git init 初始化一个git仓库 git add 将一个文件添加到仓库 git commit -m "message" 提交文件,备注信息 git status 获取仓库的状态信息 git diff 查看与上版本的不同 git log --pretty=oneline 查看提交日志(每条在一行显示) git reflog 查看命令历史 git reset hard HEAD^ 回到上一个版本(^表示上个版本^^表示上上个版本,HEAD~10 回到10次提交之前的版本) git reset hard 回到指定版本(命令行窗口未关闭情况下能使用) cat 查看文档内容 test