DEV Community

Ngobrolin IT
Ngobrolin IT

Posted on • Edited on

How to Create Zip Your Code From Visual Studio Code

Hello, dev.. πŸ‘‹

In this tutorial, I will share about how to create a zip file of your code directly from Visual Studio Code without an addon. We need a terminal to execute our command line.

For example, we want to zip the mahal folder, so we open the terminal from the themes folder. Right-click on the themes folder and select "Open in Integrated Terminal".

Integrated Terminal on VS Code

After your terminal command line is open, you can execute this command

zip -r mahal.zip mahal -x '*.git*'
Enter fullscreen mode Exit fullscreen mode

Explanation:

  • mahal.zip is the name of the zipped file. You can change with your need.
  • -r means to zip a directory recursively. This option helps you to zip all the files present in the specified directory.
  • -x means exclude the files in creating the zip. For example, we exclude the .git folder from zipping.

Good luck 🍻

Top comments (0)