http://stackoverflow.com/questions/1616957/how-do-you-roll-back-reset-a-git-repository-to-a-particular-commit

git reset --hard <tag/branch/commit id>

Notes:

  • git reset without the --hard option resets the commit history, but not the files. With the --hard option the files in working tree are also reset. (credited user)

  • If you wish to commit that state, so remote repository also points to rolled back commit do: git push <reponame> -f (credited user)

git rollback的更多相关文章

  1. git回滚错误提交

    git log //找到你要回滚的那次提交 比如:43596f6b1f57157e627c25ae7a843f60157ac52d git reset --hard HEAD~43596f6b1f57 ...

  2. git版本回退, github版本回退

    上周提交了更改,过了周末回来说要撤销上个story.于是,需要找到上周提交的版本,rollback回来. git版本管理命令,自从习惯使用管理工具之后就很少接触了,当突然寻找其他指令的时候就成浆糊了, ...

  3. 学一点Git--20分钟git快速上手

    (图片已修复)在Git如日中天的今天,不懂git都不好意思跟人说自己是程序猿.你是不是早就跃跃欲试了,只是苦于没有借口(契机). 好吧,机会就在今天. 给我20分钟,是的,只要20分钟, 让你快速用上 ...

  4. When cloning on with git bash on Windows, getting Fatal: UriFormatException encountered

    I am using git bash $ git --version git version .windows. on Windows 7. When I clone a repo, I see: ...

  5. 学一点Git--20分钟git快速上手 [Neil]

    From: http://www.cnblogs.com/shuidao/p/3535299.html (图片已修复)在Git如日中天的今天,不懂git都不好意思跟人说自己是程序猿.你是不是早就跃跃欲 ...

  6. git项目实战常用workflow和命令

    一个从无到有的项目大体经历-创建项目目录,创建repo,配置过滤集,配置git user,导入已有基础代码入库,将库放到central去,建立分支,修改代码,checkin代码,分支上 测试验证代码, ...

  7. 成功的GIT开发分支模型和策略

    详细图文并茂以及git flow工具解释参考: http://danielkummer.github.io/git-flow-cheatsheet/index.zh_CN.html 原文地址:http ...

  8. git workflow常用命令

    git init git status git add readme.txt git add --all         Adds all new or modified files git comm ...

  9. 工作中对git使用的总结

    git与svn的区别,简单的说,       svn在checkout后,如果不提交,那么版本库没有记录,如果修改的文件比较多,中间想回退几个文件,非常麻烦.git 是clone下来代码和记录,不提交 ...

随机推荐

  1. 系统安装1---U盘启动器制作

    1.下载PE制作工具,现在有很多的PE制作工具,如老毛桃,大白菜等.下面我使用的是IT天空的U盘PE制作工具. 下载地址:https://www.itiankong.net/thread-369670 ...

  2. 创建调用Consul的客户端项目

    创建调用Consul的客户端项目 创建项目 源码 Github仓库:https://github.com/sunweisheng/spring-cloud-example

  3. Linux下MySQL Error 1130 不能远程访问(转)

    Linux下MySQL Error 1130 不能远程访问 内容简介:远程连接MySQL时总是报出erro 2003: Can't connect to MySQL server on '211.87 ...

  4. UVA - 11624 J - Fire! (BFS)

    题目传送门 J - Fire! Joe works in a maze. Unfortunately, portions of the maze have caught on fire, and the ...

  5. java虚拟机规范(se8)——class文件格式(五)

    4.7.1 定义和命名新属性 允许编译器定义和发布的class文件在class文件结构体.field_info结构体.method_info结构体和Code结构体中的attributes表中包含新的属 ...

  6. SpringBoot-技术专区-异步编程

    最近在实现一个聚合搜索的需求时,由于需要从五个索引中查询数据,然后再将搜索结果组合返回给前端app展现,显然这个地方不能再用同步的方式来操作了,如果有一个索引查询出现耗时较长,那么其余的请求都会排同步 ...

  7. js 模拟window.open 打开新窗口

    为什么要去模拟window.open() 打开一个 新的窗口呢,因为有些浏览器默认会拦截 window.open, 当需要函数中打开新窗口时,接可以使用a标签去模拟打开. /** * a模拟windo ...

  8. ELK-7.3安装部署

    原文 ELK-7.3安装部署 前沿 1.什么是ELK? ELK是由Elasticsearch.Logstash.Kibana 三个开源软件的组成的一个组合体 不懂自行查阅 https://www.el ...

  9. 调试Xamarin.Android时出现缺少"Mono.Posix 2.0.0"的错误

    1.在http://originaldll.com/file/mono.posix.dll/31191.html中下载mono.posix 2.0.0 dll 2.以管理员权限运行Visual Stu ...

  10. python mqtt 客户端实现

    安装paho-mqtt pip install paho-mqtt -i http://pypi.douban.com/simple --trusted-host pypi.douban.com py ...