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. Design:设计目录

    ylbtech-Design:设计目录 1.返回顶部 1.0 蚂蚁设计 https://design.alipay.com 1.1 Ant Design - 一个 UI 设计语言 https://an ...

  2. Junit简单使用

    上篇文章也说到了,接口测试我使用的是Junit框架.因为我还是刚刚接触,也还没有深入了解,主要学会了断言的使用.断言是对测试运行结果的判断,如果结果符合要求,程序就会继续执行下去.反之,如果结果和预计 ...

  3. python使用消息队列RabbitMq(入门)

    windows平台开发和使用 安装 安装Erlang:https://pan.baidu.com/s/1QcZDaI205uaue7mMWh5cSA 安装RabbitMQ:https://pan.ba ...

  4. 不要62(数位dp)

    题目传送门 不要62 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total ...

  5. 关于sizeof的几个问题

    #include <stdio.h> #include <stdlib.h> int main(int argc, char const *argv[]) { char *ps ...

  6. Python之实现迭代器协议

    什么是迭代器: --迭代器(迭代就是循环) 可以被next()函数调用并不断返回下一个值的对象称为迭代器:Iterator 可迭代对象有: 一类是集合数据类型,如list,tuple,dict,set ...

  7. 新旧Django版本中urls与path的区别

    from django.conf.urls import url from . import view urlpatterns = [ url(r'^hello$', view.hello),] 新版 ...

  8. 转载:tomcat性能的优化

    考虑一下这种场景,你开发了一个应用,它有十分 优秀的布局设计,最新的特性以及其它的优秀特点.但是在性能这方面欠缺,不管这个应用如何都会遭到客户拒绝.客户总是期望它们的应用应该有更好的性能.如 果你在产 ...

  9. mongoose 与 mylab 的使用 (1)

    1.引入mongoose  模块 const mongoose = require('mongoose'); 2.连接数据库 //连接数据库 mongoose.connect( db, {useNew ...

  10. JSP自定义方法标签

    1.自定义方法标签 引入方式示例: <%@ taglib prefix="fns" uri="/WEB-INF/tlds/fns.tld" %> 写 ...