LoginSignup
85
65

More than 5 years have passed since last update.

Gitでローカルリポジトリを作成して、後にリモートリポジトリへ反映する

Posted at

ちょっとgithub慣れてないのでメモとして残します。

①作業場所:ローカル

ターミナルを開く
リポジトリを作成したいディレクトリで以下を行う

git init
git add .
git commit -m "hogehoge"

②作業場所:リモート

githubでリモートリポジトリを作成する
リモートリポジトリのSSHをcopyする

③作業場所:ローカル

ターミナルを開く

git remote add origin [リモートリポジトリのSSHのcopy]
git push --set-upstream origin master

これでリモートリポジトリへ反映される
あれ、これってgithubでリポジトリ作成の際にQuick setupに書かれていることと同じでした。。。

85
65
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
85
65