# git-advance **Repository Path**: lsy-points/git-advanced ## Basic Information - **Project Name**: git-advance - **Description**: git提交示例,理解学习git操作 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-03-29 - **Last Updated**: 2025-09-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README - 分布式版本控制 git init git add . git commit -m '' git reset --hard HEAD^ # 回退到上一个版本 git reset --hard 1b7d9b # 回退到指定版本 git reflog # 查看命令历史,以便确定要回到曾经的哪个版本 第四天工作 今天很开心 git diff HEAD -- xxxx.txt # 查看工作区和版本库里面最新版本的区别 git checkout -- readme.md # 丢弃工作区的修改 git reset HEAD readme.md # 撤销暂存区的修改 git reset --soft HEAD^ # 撤销commit,不删除工作区的修改