How to revert the code/files that have been merged to the remote Repo

原创 2017年11月15日 14:41:35

I pushed the wrong code to the remote Repo and just want to back out the merge.The common way is to use git revert

git revert [the commit you want to back out]

But sometimes I just want to back out several specific files.I do not find a one command way to fix it.Here is the way I use:
- Firstly revert all of the commit:

git revert [the commit you want to revert]
  • Then make the revert files to the workspace.
  • cancel the modification of the files you don’t want to back out
git checkout -- [the files needed cancel]
  • At last just remains the files you want to revert.

恢复勒索病毒“永恒之蓝”中招的文件,ooops,your files have been encrypted!解决方案

以下内容包含普通电脑解决方案、云服务器解决方案、以及预防方法、文件日常免费自动备份方案     半夜被运维值班人员的紧急电话惊醒,阿里云ECS服务器业务停止了,迷迷糊糊打开手机远程桌面,无法连接。无...
  • wjp20042005
  • wjp20042005
  • 2017年05月13日 16:48
  • 3640

在ubuntu更新时,出现错误E: Some index files failed to download, they have been ignored, or old ones used inst

http://www.songyawei.cn/content/3479 在ubuntu更新时,出现错误E: Some index files failed to download, t...
  • tian_ciomp
  • tian_ciomp
  • 2016年05月07日 19:47
  • 6067

Some index files failed to download. They have been ignored, or old ones used instead

ubuntu 更新时出现校验和不符 的一种解决办法 在更新源的时候,经常遇到这种情况 W: 无法下载 bzip2:/var/lib/apt/lists/partial/mirror...
  • u010098331
  • u010098331
  • 2016年10月11日 16:46
  • 5906

解决“Some index files failed to download, they have been ignored, or old ones used instead.”

在Debian使用apt-get update出现"E: Some index files failed to download, they have been ignored, or old one...
  • bigboygo
  • bigboygo
  • 2017年08月12日 15:41
  • 3335

Some index files failed to download. They have been ignored, or old ones used instead.

apt-get update出错解决办法更换源(建议换成下面的源)
  • SakuraLLj
  • SakuraLLj
  • 2015年11月03日 11:52
  • 588

ubuntu: apt-get update的时候遇到“E: Some index files failed to download”错误

遇到这个问题有几个解决思路: 1.也许正在使用的ubuntu更新源不在支持, 2.是否修改过dns, 3.尝试下面的方法: sudo apt-get clean   sudo a...
  • tankaro
  • tankaro
  • 2015年10月27日 16:10
  • 4511

ocp-167

QUESTION NO: 167 You have discovered that one of three control files has been lost. What steps woul...
  • xuejiayue1105
  • xuejiayue1105
  • 2015年10月07日 16:21
  • 741

Maven获取工程相关仓库的源码和javadoc方法

背景 编写程序和研读代码时,离不开仓库的源码和javadoc,如何将相关文档添加到工程中非常重要。 获取方法 进入工程的根目录,运行下列命令: mvn dependency:sources -Ddo...
  • u010096900
  • u010096900
  • 2015年01月26日 17:33
  • 639

sudo apt-get update E: Some index files failed to download. They have been ignored, or old ones use

执行 sudo apt-get update,出现以下问题: W: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/trusty-sec...
  • niutianzhuang
  • niutianzhuang
  • 2018年01月26日 09:17
  • 29

ubuntu 错误:E: Some index files failed to download. They have been ignored, or old ones used instead.

E: Some index files failed to download. They have been ignored, or old ones used instead.
  • cs_yinger
  • cs_yinger
  • 2014年07月08日 17:01
  • 3431
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:How to revert the code/files that have been merged to the remote Repo
举报原因:
原因补充:

(最多只允许输入30个字)