laravel restore project to normal state

First roll back the database migration:

$ php artisan migrate:rollback

To restore modified files to their original state:

$ git checkout . 

Check the file modification status:

$ git status

It can be seen that the rest are newly created files, and then use the following command to restore:

$ git clean -f -d 

The function of the command  git clean is to clean up the project, and it -f is a setting to force the cleaning of files. The -d option command is to clear the folder together. After successful execution, use:

$ git status
 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325028449&siteId=291194637