I'm pretty new to using git, and I wanted to figure out the "best practice" way of setting up a laravel project in my own repo and still be able to fetch updates from the main project (https://github.com/laravel/laravel.git) and merge them with my project?

Could anybody walk me through this with step by step commands?

我会非常感激的.

谢谢!

推荐答案

Laravel default app (https://github.com/laravel/laravel.git) doesn't change much and when it changes, Taylor gives the steps to migrate it. What you really want to do is to keep your project in sync with https://github.com/laravel/framework.git, for that you just have to

composer update

Every day.

But if you really want to have default app in sync too, here are some steps:

1)转到GitHub和Fork https://github.com/laravel/framework.git.

2) Install your application as you would normally:

composer create-project laravel/laravel your-project-name --prefer-dist

3) Rename git origin to anything else:

git remote rename origin laravel

4)在GitHub上创建一个新项目,并将其添加为您的新原点

git remote add origin https://github.com/you/yourproject.git

5) 添加、提交并推送:

git add -A
git commit -m "first commit"
git push origin master

你应该可以走了.

Every time you need to merge yours with Laravel's you'll probably need to:

1) Fetch the changes

 git fetch laravel

2) 请查看分支列表:

git branch -va

3) Merge yous with laravel

git merge laravel/master

Laravel相关问答推荐

如何从@foreach 循环中捕获所有数据并将其传递给 值? - Laravel

Laravel 验证 - 不同的属性规范

Laravel | 使用select查询

Eloquent/Laravel:是否有 object->load('relation') 的对应物,例如.object->unload('relation')?

如何使用 Laravel Passport 在 API 中正确实现 OAuth?

上传时Laravel正在旋转图像

.gitignore 不忽略文件夹

Laravel Auth::attempt() 返回 false

Laravel Artisan Scheduler 中的链式命令?

Laravel 查询构建器 - 如何按别名分组,或进行原始 groupBy

Laravel 扩展验证自定义消息

Laravel 中间件 except除外规则不起作用

Laravel whereDoesntHave() - 多个 OR 条件

Laravel 使用 Storage::put 生成唯一 ID

如何在新安装时指定 Lumen(或 Laravel)版本?

Laravel:自定义或扩展通知 - 数据库模型

Laravel 5 Mime 验证

Laravel 验证存在于不存在的地方

如果在 Laravel 5.1 中找不到路由,则显示 404 页面

phpunit 命令不适用于 Windows 7 上的 laravel 4