GitHubの使い方 Desktopにレポジトリを作ってコミットするまで


Desktopにレポジトリをクローンする

//terminalを開いてDesktopに移動する
$ cd (Desktopのパス)

// Gitクローンする
$ git clone (クローンしたいURL)

完了!

自分の更新を入れてプッシュする。

まず、ローカルのフォルダに自分のコードを入れたり、変更したりする。
そのあと、下記を行う。
※クローンしてすぐpushする場合だけ、しばらく立ってからやる場合は、下の二回目以降のやり方に従ってください。

// ステージングにあげる。これで全ての変更がステージに上がる。
$ git add .

// コミットメッセージを書く
$ git commit -m "コミットメッセージ"

//masterへpush
$ git push origin master

二回目以降

// ステージングにあげる。
$ git add .

// コミットメッセージを書く
$ git commit -m "コミットメッセージ"

//masterからpull
$ git pull origin master

//masterへpush
$ git push origin master

参考

リポジトリをクローンする - GitHub ヘルプ
https://help.github.com/ja/github/creating-cloning-and-archiving-repositories/cloning-a-repository#

ローカルリポジトリをリモートにpushするまで - Qiita
https://qiita.com/sayama0402/items/9afbb519d97327b9f05c