本文介绍了移动文件/目录,但仍然可以轻松合并更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读过各种常见问题,

使用 git mv 并且所有内容都将是AOK。为什么不只是试试而不是问?您可以随时在git中轻松重置。 :)

I've read in various FAQs that git doesn't explicitly track renames/moves, preferring to look for identical (or in some situations similar?) files. That's great, but will it cope with this situation: a friend's remote repository has a new feature (i18n) involving some new files at debian/po/*.po. I have my own fork of this project, and want to merge this feature but put the files at just po/*.po (I can do that as two commits, or whatever is necessary). I expect the remote repo will continue to receive updates to the feature, and I want to just merge/cherry-pick those commits and have them applied to the files in my new location. Can git do that, perhaps with some sort of mapping of "these files have moved over here now"? Or is it more pain than it's worth and should I just accept the slightly odd debian path in my repo?

解决方案

use git mv and everything will be AOK.

Why not just try it instead of asking? You can always reset easily in git. :)

这篇关于移动文件/目录,但仍然可以轻松合并更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-16 00:04
查看更多