`
sillycat
  • 浏览: 2539608 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Git Roll Back to Commits

 
阅读更多

Git Roll Back to Commits

Recently, my friends just wrongly commit his local changes to our master branch.

Here is the way to roll it back.
>git reset —hard <old-commit-number-from-browser>

>git push -f origin master





References:
http://stackoverflow.com/questions/4372435/how-can-i-rollback-a-github-repository-to-a-specific-commit



分享到:
评论

相关推荐

    git-conventional-commits:Git Conventional提交实用程序以生成语义版本和Markdown更改日志并验证提交消息

    npm install --global git-conventional-commits 用法 创建git-conventional-commits init 根据您的需要调整config git-conventional-commits.json 指令 :information: 在命令中添加帮助参数-h以列出所有可能的...

    git-semantic-commits:Git的微小语义提交消息

    而`git-semantic-commits`是Git的一个插件,旨在帮助开发者遵循语义化提交规范,使得提交信息更加清晰、一致且有意义。这个规范强调通过提交消息来明确表示代码更改的性质,有助于团队协作,自动化工作流,以及更好...

    grunt-ssh-git:根据 git commits 通过 ssh 将文件同步到服务器

    根据 git commits 通过 ssh 将文件同步到服务器 入门 这个插件需要 Grunt ~0.4.5 如果您以前没有使用过 ,请务必查看指南,因为它解释了如何创建以及安装和使用 Grunt 插件。 熟悉该过程后,您可以使用以下命令...

    解决git:fatal:Unable to create”…/.git/index.lock” 的错误

    问题描述: 在使用git 进行提交时, 出现上面这个报错, 导致无法提交. 报错大致意思就是创建index.lock文件失败,因为已经存在index.lock文件了. index.lock文件是在.git下面, 而.git是一般是隐藏的, 那么可以通过以下...

    Git-2.14.1-64-bit

    Git windows 64位 代码管理工具 Git for Windows focuses on offering a lightweight, native set of tools that bring the full feature set of the Git SCM to... Git BASH Git GUI Gitk: Exploring Commits Contrib

    Git.Best.Practices.Guide.1783553731

    This book is invaluable to anyone who wants a thorough reference guide to go back to every time they have questions about any feature of Git. Table of Contents Chapter 1. Starting a Git Repository ...

    Git Version Control Cookbook 无水印pdf 0分

    Starting with the Git data model, you will learn how Git stores files and how it looks at commits. You will then learn how you can recover from mistakes; from committing on the wrong branch to ...

    Git-2.21.0-64-bit.zip

    * "git blame" learned to "ignore" commits in the history, whose effects (as well as their presence) get ignored. * "git cherry-pick/revert" learned a new "--skip" action. * The tips of refs from...

    Git仓库清除commit历史记录.docx

    在Git仓库管理中,有时出于隐私、安全或者代码版本重置等需求,我们可能需要清除commit历史记录,将仓库恢复到初次commit的状态。这个过程涉及到对Git仓库的深入操作,包括创建新分支、添加文件、删除旧分支以及强制...

    Manning.Git.in.Practice.2014.9.pdf

    - **Exporting to SVN**: Use `git svn dcommit` to export commits from Git to SVN. This command translates Git commits into SVN format and sends them to the SVN repository. - **Importing from SVN**: Use...

    Git LFS是用于使用Git管理大型文件的命令行扩展和规范 这是3.3.0的Linux Intel 64位安装包

    Git LFS,全称Git Large File Storage,是一个用于解决Git在处理大文件时性能和效率问题的工具。Git本身设计时并未考虑对大型文件的高效存储和版本控制,而Git LFS通过提供一种命令行扩展,弥补了这一不足。Git LFS...

    Git.Version.Control.Cookbook.1782168451

    If you are a software developer or a build and release engineer who uses Git in your daily work and want to take your Git knowledge to the next level, then this book is for you. To understand and ...

    Git.Mastering.Version.Control.pdf

    Debug with Git and use various techniques to find faulty commits Customize Git behavior system-wide, on a per-user, per-repository, and per-file basis Master administering and setting up Git ...

    git压缩包下载git下载

    Git是世界上最流行的分布式版本控制系统,它允许开发人员协作开发代码并跟踪每一次更改。"git压缩包下载git下载"这个标题和描述可能指的是提供Git的安装程序压缩包的下载服务。在本篇中,我们将深入探讨Git的核心...

    多git版本管理-repo

    Repo is not meant to replace Git, only to make it easier to work with Git in the context of Android. The repo command is an executable Python script that you can put anywhere in your path. )

    Professional Git [2017]

    Professional Git ... the ability to work effectively with Git is rapidly approaching must–have status, and Professional Git is the comprehensive guide you need to get up to speed quickly.

    Git Version Control Cookbook 2nd Edition

    Git Version Control Cookbook builds on the success of the previous edition and provides you with an up-to-date guide to solving problems related to versioning. You’ll start by learning about the ...

    解决fatal:remote error:You can’t push to git://github.com/username/*.git问题的办法

    解决fatal:remote error:You can’t push to git://github.com/username/*.git问题的办法 今天Git push的时候 fatal:remote error: You can't push to git://github.com/username/*.git Use git@github....

Global site tag (gtag.js) - Google Analytics