Save disk space when cloning Git repos
I use Vim a lot and I use Pathogen to sort my list of plugins. Since I don't really contribute to them, I just consume them, I don't really need to have the full history of the code base.
git clone
has the depth
option which allows you to specify how deep you want to clone a repository. In this particular scenario, to clone Tim Pope's vim-surround
plugin, you would type:
$ cd ~/.vim/bundle
$ git clone --depth 1 git://github.com/tpope/vim-surround
You get the latest snapshot of the plugin and save up space. It's not that big of a deal when you use one or two plugins, but if you use ten big ones like I do, you might wanna do this.
Written by José Mota
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#