GitHubとは
Gitリポジトリのホスティングサービスのことです。
サーバー上に配置されたリポジトリでローカルリポジトリとリモートリポジトリを同期させることで、複数人でのバージョン管理に対応することができます。
個人プロジェクトであっても、複数の端末で作業する場合に利用することができます。
GitHubを利用することでファイルの持ち運びを容易におこなうことができます。
GitHub の利用
GitHub のページに進んでユーザー登録をおこないアカウントの作成をおこないます。
ログイン後右上の+から「」を選択してリポジトリ名を設定します。


リポジトリ名を設定します。

「Description」と公開/非公開の設定をおこなって「Create repository」を押します。

URLをコピーしておきます。
Forkでの作業
Forkを開き「Branches」➡「Remotes」➡「Add New Remote…」を開きます。

さきほどコピーしておいたURLを貼り付けます。
Remoteは「origin」のままで大丈夫です。
試しに青文字で書いてある「Test Connection」を押してみます。接続が成功すると緑のチェックが付きます。
問題なければ「Add New Remote」を押します。

左側の「Remotes」に「origin」が追加されています。
持ち運びたいブランチを選択して右クリックで「Push 2 brunches to ‘origin’…」を選択します。(2つ同時に選択したので2となっています。)

上手くいけば再度GitHubを開くとブランチがUPされていると思います。
ブランチを選択して上の「」ボタンからでもpushすることはできます。

右上の+から「Your repositories」➡さきほど作成したリポジトリ名をクリックします。


自宅や他の環境で再度GitHubにログインし、作業したいリポジトリを表示してCodeボタンをクリック。
URLをコピーしておきます。
自宅でForkを起動し「File」➡「Clone」を選択します。


GitHubにファイルをアップロードすることを「Push」といいGitHubからローカル環境にブランチを移動することを「Pull」といいます。