0
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 5 years have passed since last update.

備忘録 FuelPHPプロジェクトをGitで管理する手順(Windows)

Last updated at Posted at 2017-03-01

プロジェクトを置くディレクトリに移動

$ cd プロジェクトを置くディレクトリのパス

FuelPHPのプロジェクトをクローン

$ git clone --recursive git://github.com/fuel/fuel.git プロジェクト名

プロジェクトルートに移動

$ cd プロジェクト名

プロジェクトにパッケージ類をインストール

$ php composer.phar self-update
$ php composer.phar update

既存のGitリポジトリを削除

$ rm -rf .git/

Gitのユーザ名メールアドレスを登録

コミットした際のユーザ名になる

$ git config --global user.name "ユーザ名"
$ git config --global user.email "メールアドレス"

以下のコマンドで正しく登録できているか確認できる

$ git config --global --list
user.name=ユーザ名
user.name=メールアドレス

新たにGitリポジトリを作成

$ git init

プロジェクト内のファイルをステージングエリアに追加

$ git add -A

リポジトリにコミット

$ git commit -m "コミットメッセージ"

git log コマンドでコミットの履歴を確認できる

$ git log
commit SHA-1 チェックサム
Author: ユーザ名 <メールアドレス>
Date:   コミット日時

    コミットメッセージ

例:
commit 8a0934628eb658251cb182c1929daec27a3f205e
Author: Shimattta <Shimattta@g.com>
Date:   Wed Mar 1 15:20:25 2017 +0900

    Commit!

リモートリポジトリの追加

$ git remote add origin 追加したいリポジトリのURL

以下のコマンドでリモートリポジトリの確認ができる

$ git remote -v
origin リモートリポジトリのURL (fetch)
origin リモートリポジトリのURL (push)

リモートリポジトリにプッシュ

$ git push origin master

2回目以降のaddからFuelPHPのconfigファイルを除く設定

$ git update-index --skip-worktree fuel/app/config/*.php
$ git update-index --skip-worktree fuel/app/config/*/*.php
0
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
0
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?