Quantcast
Channel: 初心者タグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 21081

【Git, GitHub】最速でGitHubにリポジトリを作成し、PUSHする方法

$
0
0

①リポジトリ作成

GitHubにログイン

下記のページにアクセスする
GitHub

リポジトリ作成

「New Repository」ボタンを押下し、下記情報を入力

- Repository name:リポジトリの名前を入力
- Description:リポジトリの説明を入力
- Public:公開を選択
- Initialize this repository with a README:チェックなし
- Add .gitignore:Noneを選択
- Add a licence:Noneを選択

「Create repository」ボタンを押下

②コーディング

ディレクトリ作成

ターミナルを開き、下記コマンドを入力

$ mkdir programming
$ cd programming/
$ mkdir php_study
$ cd php_study/

phpファイル作成

エディタを開き、php_studyディレクトリ配下に下記のphpファイルを作成

hello.php
<?phpecho'hello world';

③リモートリポジトリに反映 (PUSH)

コマンド実行

ターミナルを開き、下記コマンドを入力

$ cd programming/php_study/
$ git init
$ git add *$ git commit -m"first commit"$ git remote add origin https://github.com/ユーザ名/リポジトリ名.git
$ git push -u origin master

完了

これにて作業完了。GitHubのアカウントにて確認できる。


Viewing all articles
Browse latest Browse all 21081

Trending Articles