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. linux文本查看与搜索

    1. cat-->全文本显示 cat file #全文本显示在终端 cat -n file #显示全文本,并显示行号 cat file1 file2 >file3 #将file1 file ...

  2. django简单实现注册登录模块

    源码下载:https://files.cnblogs.com/files/hardykay/login.zip 新建项目(我使用pycharm开发,也可以使用如下命令建立项目 ) cmd命令行,前提需 ...

  3. ==和equal的区别

    1.“==”运算符专门用来比较两个变量的值是否相等,也就是用于比较变量所对应的内存中所存储的数值是否相同,要比较两个基本类型的数据或两个引用变量是否相等,只能用==操作符. 如果一个变量指向的数据是对 ...

  4. 解惑结构体与结构体指针(struct与typedef struct在数据结构的第一道坎)

    /* 数据结构解惑01  在数据结构中会看到 typedef struct QNode { QElemType data; //数据域 struct QNode *next; //指针域 }QNode ...

  5. webpack打包配置中出现的问题

    第一个错误: One CLI for webpack must be installed. These are recommended choices, delivered as separate p ...

  6. 阿里云 消息队列mq

    使用阿里云消息队列 控制台地址:http://ons.console.aliyun.com/#/home/topic Demo: 支付消息mq工厂类: public class DfacePayCon ...

  7. 51.Lowest Common Ancestor of a Binary Tree(二叉树的最小公共祖先)

    Level:   Medium 题目描述: Given a binary tree, find the lowest common ancestor (LCA) of two given nodes ...

  8. C#程序的编译过程

    C#程序的编译过程,如下图 总结:编译器将C#代码编译成DLL/EXE,DLL/EXE包含metadata(清单数据,对代码的描述)和IL(中间语言),IL(中间语言)经过CLR/JIT第二次编译才是 ...

  9. python opencv 生成验证码

    基本思路是使用opencv来把随机生成的字符,和随机生成的线段,放到一个随机生成的图像中去. 虽然没有加复杂的形态学处理,但是目前看起来效果还不错 尝试生成1000张图片,但是最后只有998张,因为有 ...

  10. 回车\r的含义

    package main import "fmt" func main() { // \r 回车,从当前行的最前面开始输出,覆盖掉以前的内容 // 输出:曹操刘备关羽 fmt.Pr ...