{ "info": { "author": "Miguelangel Fernandez", "author_email": "miguelangelxfm@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Version Control :: Git", "Topic :: Utilities" ], "description": "# gitkeep\n\nSometimes when working with Git you require empty folders to be part of your\nrepository. Maybe because you want to underline the\nimportance of certain directories for storing certain files in the future.\nMaybe some part of the logic depends on those directories being there.\n\nHowever, because Git only versions files, it is [unable to add empty directories ](https://git.wiki.kernel.org/index.php/GitFaq#Can_I_add_empty_directories.3F).\n\nOne well known hack to get around this problem is to version dummy files inside\nthe empty directories you wish to add to your repository, in order to force\nthe directory into source control.\n\nGitkeep is a tiny command line utility written in Python that makes it easy to\nuse this hack, by creating `.gitkeep` files in the directories of your choosing.\n\nIn the Bash command line it is the equivalent of running:\n\n find . -type d -empty -exec touch {}/.gitkeep \\;\n\nHowever, using the Bash command above forces you to do the same for each directory\npath you wish to version, and then to manually delete any exceptions.\n\nAlso, Windows users do not have the luxury of the Bash command line unless they\ninstall Cygwin.\n\n# Install\n\nIf you already have Python installed, simply run:\n\n pip3 install gitkeep2\n\n# Use\n\nTo create a `.gitkeep` file in a specific directory called 'foo':\n\n gitkeep path/to/foo\n\nTo add a message to your `.gitkeep` file in order to let fellow developers\nunderstand why it's important to keep the specified directory in source control\nyou can use the `--message` or `-m` flag:\n\n\tgitkeep path/to/foo -m \"This is where we'll later add X stuff.\"\n\nBy default all `.gitkeep` files bear the date of creation, the URL to this\nproject and a default message. The idea here is to help others maintaining your\nproject in the future understand what these files are. However, if you'd prefer\nto create empty `.gitkeep` files you can do so with the `--empty` or `-e` flag:\n\n\tgitkeep path/to/foo -e\n\nTo remove a `.gitkeep` file from a specified path use the `--let-go` or `-l` flag:\n\n\tgitkeep --let-go path/to/foo\n\nTo create `.gitkeep` files recursively in a path and all its sub-directories\nuse the `--recursive` or `-r` flag:\n\n gitkeep --recursive path/to/foo\n\nTo remove all `.gitkeep` files recursively from a path and all its\nsub-directories use a combination of the `-r` and `-l` flags above:\n\n gitkeep -lr path/to/foo\n\n# Implementation Notes\n\nGitkeep is powered by [Click](http://click.pocoo.org/6/).\n\n## Develop\n\nFirst prepare a virtual environment to install your local copy. From the root of\nyour project run:\n\n virtualenv venv\n New python executable in venv/bin/python\n Installing setuptools, pip............done.\n\nActivate the corresponding environment. On OS X and Linux, do the following:\n\n . venv/bin/activate\n\nNotice the prompt of your shell has changed to show the active environment.\n\nGet Click installed in your virtual environment:\n\n pip3 install Click\n\nTo install gitkeep in your virtual environment:\n\n\tpip3 install --editable .\n\nThen just try running gitkeep:\n\n\tgitkeep --help\n\nTo go back to the real world, run:\n\n deactivate", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mig82/py-gitkeep", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "gitkeep2", "package_url": "https://pypi.org/project/gitkeep2/", "platform": "", "project_url": "https://pypi.org/project/gitkeep2/", "project_urls": { "Homepage": "https://github.com/mig82/py-gitkeep" }, "release_url": "https://pypi.org/project/gitkeep2/1.0.0.post1/", "requires_dist": null, "requires_python": "", "summary": "A tiny utility to force empty directories into a Git repo.", "version": "1.0.0.post1" }, "last_serial": 4626923, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "870491490808433e173c2c073e75a1d9", "sha256": "2e29d882d4f2cb0d60922b3d4670abe50747ceaa3099c616e0685e1ba00d0875" }, "downloads": -1, "filename": "gitkeep2-1.0.0.tar.gz", "has_sig": false, "md5_digest": "870491490808433e173c2c073e75a1d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4287, "upload_time": "2018-12-22T00:01:37", "url": "https://files.pythonhosted.org/packages/b2/29/49a544521493e6277985c8b723660de6b2c4c2e495c453f8fe552559d29b/gitkeep2-1.0.0.tar.gz" } ], "1.0.0.post1": [ { "comment_text": "", "digests": { "md5": "5c088b43cd7d2c68d2140547ee216ee0", "sha256": "3b1f644972fd89508b090f647534e44d682832d859eef05d431adc314bcadf28" }, "downloads": -1, "filename": "gitkeep2-1.0.0.post1.tar.gz", "has_sig": false, "md5_digest": "5c088b43cd7d2c68d2140547ee216ee0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4337, "upload_time": "2018-12-22T00:26:29", "url": "https://files.pythonhosted.org/packages/fe/1e/9cc728d2d8236eb6418e58da42cbcea04d66b5c14ef1085d4f7f0ec2b834/gitkeep2-1.0.0.post1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5c088b43cd7d2c68d2140547ee216ee0", "sha256": "3b1f644972fd89508b090f647534e44d682832d859eef05d431adc314bcadf28" }, "downloads": -1, "filename": "gitkeep2-1.0.0.post1.tar.gz", "has_sig": false, "md5_digest": "5c088b43cd7d2c68d2140547ee216ee0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4337, "upload_time": "2018-12-22T00:26:29", "url": "https://files.pythonhosted.org/packages/fe/1e/9cc728d2d8236eb6418e58da42cbcea04d66b5c14ef1085d4f7f0ec2b834/gitkeep2-1.0.0.post1.tar.gz" } ] }