Ignoring an already checked-in directory's contents?

后端 未结 6 1407
说谎
说谎 2020-12-04 04:55

I have a git repository that\'s used only to hold graphics and sound files used in several projects. They are all in one directory without sub-directories. Now I just create

6条回答
  •  囚心锁ツ
    2020-12-04 05:08

    Not sure if this counts or makes me a bad person, but here it goes.

    1. I added *Generated* to the root .gitignore file
    2. I submitted the files I want to keep as GeneratedFile.Whatever.ext.CheckedIn
    3. I made a git hook on post checkout to call a powershell script doing this:

    dir *.CheckedIn -Recurse | %{ copy $_.FullName "$($_.FullName)".Replace("CheckedIn","") -EA SilentlyContinue}

    I do feel a little bad about myself... but it does in fact work.

提交回复
热议问题