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.

GITでデプロイするまで

Posted at

sshkeyを登録した後は、デプロイをしてみましょう。

ディレクトリを作成し、そのディレクトリに移動する

mkdir 好きな名前

cd 今作ったディレクトリ名

git init

mkdirでディレクトリを作り、cdコマンドで操作するディレクトリに移動する感じです。
git initはそのディレクトリで操作を開始しますよというコマンドです。

デプロイしたいサイトをステージングエリアに移動する

git add ファイル名

追加したファイルをリポジトリに記録する

git commit -m メッセージを追加

これでリモートリポジトリにファイルを移動できました。
ここの-mと言うのはメッセージを追加するオプションです。
基本的には変更した点についてメッセージを書きます。

ステージエリアからGITリポジトリに

git hubに自分の作ったファイルを上げます。

git remote add origin https名

これによってリモートリポジトリの情報を追加します。
https名は自分が作ったgit hubのディレクトリの画面でclone or downloadというボタンをクリックすると出てくるので、それをコピーします。

git push origin master

これでgit hub上に指定したファイルを上げることができました。

以上になります。
URL(https://techacademy.jp/magazine/6235#sec8)
参考にさせていただいたサイトです。
間違いや指摘があればお願いします。

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?