Quantcast
Channel: Programming and Technology » GNU/Linux
Viewing all articles
Browse latest Browse all 55

Create a tar.gz file excluding git metadata

$
0
0

When using tar it’s very important to obey the order of the options.

Mimetypes-application-x-compressed-tar-icon

The last option always has to be “f” to indicate the file we want to be created. If you want to exclude some files or folders you can’t either place the --exclude option before the compress “c” option. What’s the solution then? Placing it in the middle like so:

tar czvp --exclude='.git' -f folder.tar.gz folder

Viewing all articles
Browse latest Browse all 55

Trending Articles