LoginSignup
2
1

More than 5 years have passed since last update.

Cloud9 on Rails Gitの設定一部始終

Posted at

Cloud9でGitの設定を行う

Github上での操作

1. まずはgithubで新規にレポジトリを作成します

スクリーンショット 2017-09-29 20.41.48.png

2. リポジトリの情報を適当に埋めて作成

スクリーンショット 2017-09-29 20.42.53.png

情報を埋めたら、緑のCreate repositoryボタンを押す

3. リポジトリのパスをコピーする

スクリーンショット 2017-09-29 20.44.34.png

cloud9上での操作

1. ターミナルで下記のコマンドを実行する

$ git init
$ git add .
$ git commit -m "first commit"
$ git remote add origin [先ほど取得したリポジトリのパス]
$ git push origin master

コマンドの意味は上から、
1. gitの初期化
2. 配下のファイルをgit管理に加える
3. 最初のコミット
4. ローカルとgithubを接続する
5. githubへソースコードをアップする

2. githubへ戻って確認

下記のようになっていればgitの設定はOK

スクリーンショット 2017-09-29 20.57.44.png

2
1
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
1