MIT协议 文件名: LICENSE Copyright <YEAR> <COPYRIGHTHOLDER>Permission is hereby granted, free of charge, to any person obtaining a copy of thissoftware and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rights touse, copy, modify, merge, publish, distribute, sublicense, and/or sell copiesof the Software, and to permit persons to whom the Software is furnished to doso, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copiesor substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.
git reset HEAD <file> 将最近一次提交到暂存区域的文件撤回
其中file 可以写可以不写, file 可以指定文件,如果不写就是把最后一次提交的文件恢复
git checkout -- <file> 可以把修改过的文件修改会原来的版本
git log 查看日志
log中的id 问hash值 ssha
git log --oneline 简洁查看
还可以指定作者 git log --author
回到过去
reset 回滚快照
git rest HEAD~ 回到暂存区 (log中上一个快照)
git reset --soft HEAD~ 撤销上一次的提交
git reset --hard HEAD~ 直接删除工作空间的文件
git reset id 回滚到指定id号(不仅看可以回滚,还可以往前走,但是要至少知道版本号的前5位)