My source tree contains several directories which are using git source control and I need to tarball the whole tree excluding any references to the git metadata or custom log files.
I thought I'd have a go using a combo of find/egrep/xargs/tar but somehow the tar file contains the .git directories and the *.log files.
This is what I have:
find -type f . | egrep -v '\.git|\.log' | xargs tar rvf ~/app.tar
Can someone explain my misunderstanding here? Why is tar processing the files that find and egrep are filtering?
I'm open to other techniques as well.