git - How to get the commit history of a particular folder which is one of the child folder of a parent folder - Stack Overflow

admin2025-04-17  3

I have a folder named tools, which has many sub-folders inside it.

  • tools
    • config
    • diag
    • control

The git remote -v of the tools folder is /ship/tools. So any code that is contributed to config or diag or control will be tracked by git.

I want to move the control folder to a different git remote, I just need to get the commit history of the control folder alone.

Additionally, Also how to move the control folder with just the commits from the control folder to a new folder with a working tree whose git remote is different.

Is there any command to do that? I am stuck at this for a long time could anyone help.

转载请注明原文地址:http://anycun.com/QandA/1744902929a89248.html