我正在合并中,我只是做了git checkout --theirs my_file
而我想要git checkout --ours my_file
。
有办法扭转它吗?
TL; DR:只是git checkout --ours my_file
正如@matt在评论中提出的那样,您可以使用git checkout <version> -- my_file
签出所需的特定版本。
最简单的方法是实际输入第二个命令git checkout --ours my_file
,因为--ours
和--theirs
是对基本分支和合并分支的引用。所以它基本上就像@ matt的解决方案,更简单的参考。