Git export (like SVN export)

I have been working with git for a while now on my Ruby on Rails projects and client side (css, Html and JavaScript) projects. I haven’t moved completely in flex projects and other projects, but I do plan to in the near future, mainly because of the reason that you can integrate GIT into flash builder 4. But, that is not the point.

This week I was working with a company on a client side project. I had to email them the files every time and the .git folders inside the project were heavy and unnecessary.

If you worked with SVN, you probably know the export command, after searching for a bit in git help I found how you can do it in git with ease.

How to do?

This is the command you should use:


git checkout-index -a -f –prefix=/path/to/your/folder/


The ending forward slash is very important! Do not forget to use it please.

A screenshot of my shell:

So, this is how you export git.

Good luck!

Submit to Hacker News

[NOTE] This post has been imported to Hugo from a Wordpress blog. It may be broken, missing images, code snippets or other information.

[NOTE] updated June 9, 2010. It's 3155 days old . This article may have outdated content.