Git – 合并冲突时,撤销合并

执行合并操作时,遇到冲突,暂时又不想解决冲突,可以通过以下命令撤销合并:

最新版本时:

git merge --abort

版本早于 1.7.4 时:

git reset --merge

版本早于 1.6.2 时:

git reset --hard

注:git merge --abort is equivalent to git reset --merge when MERGE_HEAD is present.

参考链接

分享到: 更多

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>