tortoise git backup empty folders

24 views
Skip to first unread message

Sand Glass

unread,
Aug 13, 2016, 11:46:54 AM8/13/16
to git-for-windows
I use tortoise git in windows, how to backup a empty folder automally?
I know git only backup files, so it will ignore empty folders.
In linux you can run this command 'find . -type d -empty -exec touch {}/.my_git_keep \;' before you commit a folder. Thus can create a .my_git_keep file in each empty folder.
But in windows bat file, how can I write a script to get to the upper result?
Tortoise git is based on UI, when you backup a project, usually use the follow steps:
'into your project folder' -> 'git create a repository here' -> 'add' -> 'commit'.
So, can I create .my_git_keep file in each empty folder automatically in 'add' step?
Reply all
Reply to author
Forward
0 new messages