2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Laravelで新規プロジェクトを作成する時にGitでやっておくべきこと

Last updated at Posted at 2020-07-08

プロジェクトを新規作成する際に最初にやるべきことは、Gitコマンドによる開発環境の構築になります。
本記事では、新規プロジェクト作成からgit-flowモデルでの開発環境の構築手順をまとめました。
なお、Composerは既にインストール済みのものとしています。

#環境
MacBook Pro (13-inch, 2020, Two Thunderbolt 3 ports)
PHP 7.4.1
Laravel Framework 7.18.0

Laravelプロジェクト作成

composer create-project --prefer-dist laravel/laravel SampleProject

localhost起動確認

  cd SampleProject
  php artisan serve
  Laravel development server started: <http://127.0.0.1:8000>

#ステージング領域作成からプッシュまで

git init
Initialized empty Git repository in 作業ディレクトリのパス
git add .
git commit -m "コミットメッセージ"
git remote add origin リモートリポジトリURL
git push -u origin HEAD

#作業ブランチを新規作成

git checkout -b develop
git checkout -b feature/作業ブランチ名
2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?