Quick tip! If you’re using Git when developing WordPress themes and would like to create a clean “export” of the theme that would be installable from the WordPress admin interface and accepted to the WordPress.org themes directory, you can use the git archive command for that with some special arguments:
git archive --format zip --output /path/to/themename-1.1.zip --prefix=themename/ master
This will create a zip file called themename-1.1.zip with a themename directory inside from the master branch of the Git repository. This means that when the theme is unarchived either by WordPress or manually, you won’t end up with a themename-1.1 directory.