git-revert命令的机制是什么? [英] What are the mechanics of git-revert command

查看:227
本文介绍了git-revert命令的机制是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

git-revert如何工作?它是否会创建一个修补程序或修补程序列表(仅用于反向),然后将其应用到哪个修补程序或修补程序列表中?是否将路径从旧的提交复制到新的提交中?

解决方案

它创建了新的提交,其效果是撤消之前的提交。基本上,它会在您恢复的提交中创建相反的修补程序,并将该修补程序作为新提交提交。

How does git-revert work? Does it make a patch or list of patches (only in reverse) which it then applies, or does it simply copy paths from the old commit into the new commit?

解决方案

It makes new commits, the effect of which is to undo the previous commit. Basically it makes an opposite patch of the patch in the commit you're reverting it, and commits that patch as a new commit.

这篇关于git-revert命令的机制是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆