Skip to content

Instantly share code, notes, and snippets.

@Aeon
Last active December 14, 2015 15:48
Show Gist options
  • Save Aeon/5110246 to your computer and use it in GitHub Desktop.
Save Aeon/5110246 to your computer and use it in GitHub Desktop.
moving files - there and back again
if you have a list of files that you had to temporarily move
out of a nested subdirectory set into a single directory, you
can move them back correctly by doing this on the list of
original locations
search and replace
^(.*?)?([^/\n]*/?)$
with
mv "$2" "/origin/$0"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment