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