From the course: Coding Exercises: Git

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Creating a .zip file

Creating a .zip file - Git Tutorial

From the course: Coding Exercises: Git

Creating a .zip file

- You're working on a new project and you want to send the project along to someone else, so that they can try it. But they don't need the whole Git-Repo. Now what's a quick way to send them a specific folder of a specific branch in a zip format? I'll give you a couple of seconds to think about how you would do something like this. All right, so the command for taking care of this is called git archive and there's a few options that you can use. So for example, you can specify a format and it's really just zip or tar. So normally you would just want to include it as a zip file. It's also the default and you can also specify a specific work tree or a specific remote. So this is actually pretty cool because you can ask to zip a specific folder of a remote branch automatically from your local folder. So let's give this thing a try. So I'm going to say, git archive and I'm going to issue the minus O option. With the O…

Contents