签出特定文件夹中的未分级文件

This is the status form my git

modified:   app/controllers/LoginController.php
modified:   app/routes.php
modified:   app/views/login.blade.php
modified:   bootstrap/start.php
modified:   public/fonts/fontawesome-webfont.ttf
modified:   public/images/screenshot.png

and there are many more files from the public directory. These files i don't know how got modified. May be changing permissions.

Real question is how can i git checkout all the files from the public directory so that i will only be left with my .php files to add them.

Thanks

you can simply make a git checkout public/ as refered in the documentation you can use a pathspec for checkout and it'll checkout the files in there.

git checkout [-p|--patch] [<tree-ish>] [--] <pathspec>