LoginSignup
1

More than 5 years have passed since last update.

.git以外を削除してリポジトリ変えたい時

Last updated at Posted at 2016-06-08
  • .git以外を削除してリポジトリ変えたい時
#git以外削除
ls -a | grep -v -E '\.$|\.\.$|\.git' | xargs rm -rf
#複数指定時
ls | egrep -v '^hoge|tmp$'|xargs rm -r

#git以外コピー
rsync -a pogepoge/ ~/tmp/hoge/ --exclude '.git' --exclude 'config/database.yml'

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1