git and empty folders

前端 未结 8 812
感情败类
感情败类 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:15

    You should realize that you are asking for your source control system to set up some resources that are not source, not part of your build system, but essential to the operation of your application. I would do one of the following:

    1. Make the build create the necessary directory.
    2. Have the application create the required directories as it runs.

    Similarly, if the application wanted to append to a log file, it wouldn't make sense to have that logfile start out in the revision control system, would it?

提交回复
热议问题