Githubでローカルからリモートリポジトリのへプッシュ方法
ローカルで作成したプロジェクトをGithubのリモートリポジトリにプッシュする手順について
ローカルプロジェクトのリポジトリ作成からリモートへのプッシュ手順
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#対象プロジェクトに移動 | |
cd /prj_name | |
#リポジトリを作成 | |
git init | |
git status //状態確認 | |
#ローカルプロジェクト内のファイルをコミット | |
git add. | |
git commit -m "First commit." | |
#リモートリポジトリへ接続し、プッシュ | |
git remote add origin ssh://git@github.com:UserName/ProjectName | |
もしくは | |
git remote add origin https://github.com/UserName/ProjectName | |
git push -u origin master | |
プッシュまで完了したら、Githubの対象リポジトリの内容をブラウザ更新して確認。 正常にフォルダがアップロードされていたら終了。
<メモ>
gitは慣れていないので、メモ。SourceTreeと併せて学んでいきたい。