Remove all git files from a directory?

前端 未结 7 1632
不思量自难忘°
不思量自难忘° 2021-01-30 12:17

I have a folder under version control. I want to make a copy of it to send around, but don\'t want to include all the .git directories and the files underneath it.

Is

相关标签:
7条回答
  • 2021-01-30 13:08

    In case someone else stumbles onto this topic - here's a more "one size fits all" solution.

    If you are using .git or .svn, you can use the --exclude-vcs option for tar. This will ignore many different files/folders required by different version control systems.

    If you want to read more about it, check out: http://www.gnu.org/software/tar/manual/html_section/exclude.html

    0 讨论(0)
提交回复
热议问题