I am trying to create an archive as:
tar -Jcvf shadow-2.7.1.tar.xz shadow/ --exclude-vcs
and I am expecting no .git
folder. But
vi shadow-2.7.1.tar.xz
yeilds
...
shadow/.git/
shadow/.git/index
shadow/.git/objects/
shadow/.git/objects/ab/
...
Mu system is:
which tar
/usr/bin/tar
tar --version
tar (GNU tar) 1.29
uname -sr
Linux 4.9.6-200.fc25.x86_64
What is going wrong here?
tar -Jcvf --exclude-vcs shadow-2.7.1.tar.xz shadow/
should do the job.