Quickly make a deploy folder from git
Nov 14, 2011 · 1 minute readCategory: git
This is post is now quite old and the the information it contains may be out of date or innacurate.
If you find any errors or have any suggestions to update the information please let us know or create a pull request on GitHub
This works we use a public folder within our git structure which makes filtering the files easy, if you don’t have this then you will have to change the grep filter to match your needs. Obviously you can change the since filter to get the files you need.
git log –since=“2 weeks ago” –name-status | grep public | sort | uniq | awk ‘{print $2}’ | xargs -I % cp –parents % /path/to/deploy
Hope this helps in the future