2周目 1章 ゼロからデプロイまで
2周目の目標。
・理解度80%
(・ローカル環境での開発)
・githubとの連携
・herokuを用いたデプロイまで
・8/7(水)までに2周目完走
gitに関して
https://qiita.com/gosairei1207/items/701b7ae494b96db0f9a1
で、ユーザー登録などをまずは行う。
$ git config --global user.name "xxxx" $ git config --global user.email "xxxxxx@gmail.com"
githubを用いる時のコマンド
git remote add origin https://github.com/TakutoHamaba/sample_app.git
git push出来ない問題
解決!!
githubアカウントで、repositoriesからNewをしていなかった。
この後fatal: remote origin already exists.と出ても、
git remote rm origin
で一度削除した後にやり直せばOK。
heroku
1.5.2で
git push heroku master
をコピーするとrが抜けることがあるから注意
他はすんなりいく。
※7/27 13時追記
URLは、ターミナルの下に出てくる
To https://git.heroku.com/stark-island-21648.git
https://stark-island-21648.herokuapp.com/
上の方だとMethod Error出るよ。
デプロイ完了!
スマホでも確認
---
Gitについて
https://qiita.com/wwacky/items/2f110ee76fc1cb681c3b
git addでコミットするファイルを追加し、
その後git commitでコミットする。
git pushは外部リポジトリにローカルリポジトリの内容を送信
git branchで枝葉を作成
git mergeで一本に戻す
#コミットするファイルを追加
> git add [ファイル1] [ファイル2] ・・・
# 一括で登録する時
> git add [-A | -u | .]
#gitへのコミット
> git commit [-a] [-m "コミットメッセージ"]