1,切回到 Git 的主分支上。
$ git add -A $ git commit -m "Finish layout and routes" $ git checkout master
这时我们运行 Git 的状态检查命令,会发现新增了一个 public/css
文件夹。解决冲突的方法很简单,先检出 Master,放弃所有文件修改,再进行分支合并即可。
$ git checkout . $ rm -f public/mix-manifest.json $ git merge filling-layout-style
最后让我们将代码推送到 GitHub 和 Heroku 上。
$ git push
$ git push heroku master
2,创建一个新分支
$ git checkout master
$ git checkout -b modeling-users
3,操作文件:
$ mkdir app/Models $ mv app/User.php app/Models/User.php $ php artisan make:model Article $ rm app/Article.php $ php artisan make:model Models/Article $ rm app/Models/Article.php $ php artisan make:model Models/Article -m Model created successfully. Created Migration: 2016_09_10_023235_create_articles_table
4,强制撤销修改
$ git add -A
$ git checkout -f
5,新建文件
$ touch resources/views/users/show.blade.php
6,删除文件夹
git rm -rf 文件夹名
$ rm -r app/Http/Requests/
参考:https://www.cnblogs.com/SamWeb/p/6516784.html