Skip to content

Instantly share code, notes, and snippets.

@mandarjog
Created February 16, 2018 02:07
Show Gist options
  • Save mandarjog/3500852ccbdbc06b2ae0ab406689c30e to your computer and use it in GitHub Desktop.
Save mandarjog/3500852ccbdbc06b2ae0ab406689c30e to your computer and use it in GitHub Desktop.
Move contents of git repo to a directory preserving content
mkdir -p $1
mv $(ls -1a | grep -v $1| grep -v .git$ | grep -v '\.$') $1
# git filter-branch -f --prune-empty --tree-filter 'path_to/move.sh <NAME_OF_SUBDIR>' @
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment