Skip to content

Instantly share code, notes, and snippets.

@rozzy
Created July 3, 2014 12:39
Show Gist options
  • Save rozzy/a26f3325a92c1d45a196 to your computer and use it in GitHub Desktop.
Save rozzy/a26f3325a92c1d45a196 to your computer and use it in GitHub Desktop.
Create .gitignore file in empty directories to commit them. (Fish)
function commit-empty-dir -d "Create .gitignore file in empty directories to commit them"
sudo find . -type d -empty -exec touch '{}'/.gitignore \;
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment