gitignore by file size?

前端 未结 5 640
难免孤独
难免孤独 2020-12-04 10:14

I\'m trying to implement Git to manage creative assets (Photoshop, Illustrator, Maya, etc.), and I\'d like to exclude files from Git based on file size rather than extension

5条回答
  •  有刺的猬
    2020-12-04 11:11

    Although the file size is very large and the following should not be an issue at all and provided that @abendine answer is correct, according to: https://stackoverflow.com/a/22057427/6466510

    find * -size +1G | cat >> .gitignore
    

    it would be far better. Have a look at this too: Difference between find . and find * in unix it turns out that replacing . with * here above, avoid to find things in .git directory.

提交回复
热议问题