- .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'
More than 5 years have passed since last update.
#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