Git export (like SVN export)

Posted on Jun 9, 2010

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:

[shell]

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

[/shell]

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!