Created
September 10, 2013 14:47
-
-
Save ruiwen/6510503 to your computer and use it in GitHub Desktop.
Move tracked files in git into a particular directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mkdir rb | |
$ for i in `git ls-tree HEAD | cut -f2`; do git mv ${i} rb/; done | |
# Optional - undo the move for those that shouldn't have been moved | |
$ git reset HEAD {.gitignore,Procfile,requirements.txt,scripts,minions} | |
$ git checkout -- {.gitignore,Procfile,requirements.txt,scripts,minions} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment