是否可以在Git中移动/重命名文件并维护其历史记录? - Is it possible to move/rename files in Git and maintain their history?
2020-07-15 06:30
1061 查看
钉钉、微博极速扩容黑科技,点击观看阿里云弹性计算年度发布会!>>>
问题:
I would like to rename/move a project subtree in Git moving it from 我想在Git中重命名/移动项目子树,将其从
/project/xyz
to 至
/components/xyz
If I use a plain git mv project components
, then all the commit history for the xyz project
gets lost. 如果我使用普通的git mv project components
,那么xyz project
所有提交历史记录都会丢失。 Is there a way to move this such that the history is maintained? 有什么办法可以移动历史记录吗?
解决方案:
参考一: https://stackoom.com/question/9i96/是否可以在Git中移动-重命名文件并维护其历史记录参考二: https://oldbug.net/q/9i96/Is-it-possible-to-move-rename-files-in-Git-and-maintain-their-history
相关文章推荐
- Is it possible to display icons in a PopupMenu?PopupMenu中显示图片是否可能
- 是否有可能从另一个git存储库中挑选一个提交? - Is it possible to cherry-pick a commit from another git repository?
- Java基础之访问文件与目录——移动或复制文件和目录(MoveAndCopyFiles)
- git trace row history 找寻某一个文件中某一行的历史记录
- Is it possible to implement IPv6 on a virtual interface (eth0:1 interface) in Linux?
- Issue 12(Anyone can make things bigger and more complex. What require more effort and courage is to move in the opposite directi
- IELTS12 Test5 It is good to share as much information as possible in any areas
- What is reflection and how to use it in CSharp ?
- It is not possible to run two different versions of ASP.NET in the same IIS process.问题的解决
- Is it possible to display icons in a PopupMenu?
- git当移动文件与更改文件共存Please enter a commit message to explain why this merge is necessary
- warning: push.default is unset; its implicit value has changed in Git 2.0 from 'matching' to 'simple
- It is not possible to run two different versions of ASP.NET in the same IIS process:IIS
- This function has none of Deterministic,no sql,or reads sql data in its declaration and binary logging is enabled(you *might* want to use the less safe log_bin_trust_function_creators variable
- [Err] 1418 - This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creator【s
- 如何重新命名Git分支(how to rename a git branch locally and remotely?)
- I learned several ASP.NET's AJAX ability today! It is so interesting and so easy to use AJAX in ASP.NET.
- "AND" in linq? is it possible?
- Is it possible to use a checkbox in a split button list instead of the gear icon?
- Is it possible to show some Word Document (or Excel document) in a UniGUI Frame ?