git and empty folders

前端 未结 8 793
感情败类
感情败类 2020-12-05 13:19

So I see Git doesn\'t recognize folders, or should I say when the only change between commits is addition of empty folders to the working tree they\'re not show in git

相关标签:
8条回答
  • 2020-12-05 14:18

    People often put an empty file as a placeholder in the folder to overcome that limitation...

    0 讨论(0)
  • 2020-12-05 14:18

    I am also facing the same issue. I think it has got to do with the way Git tracks changes. It does not track files but rather its contents. When showing the changes, commits or logs it maps the changes to specific files and shows the changes in individual files. See this video for more details Tech Talk: Linus Torvalds on git Linus specifically gives an example about moving a function from one file to another and how git is able to track the change.

    0 讨论(0)
提交回复
热议问题