タツオチップス

最近は https://note.com/tatsuosakurai に書いてるかもです

githubにリポジトリを作る

書くまでもないくらいすごく簡単ですが、

1.githubのアカウントを作る
 https://github.com/signup/free でアカウントを作る。
 (SSH Public Key の作り方がわからないよーという場合は(explain ssh keys)をクリック。)
2.githubにリポジトリを作る
 githubにログインして、Dashboard->Your RepositoriesのNew Repositoryをクリック
 Projecct Nameを入力してCreate Repositoriesボタン押下。
 すると、移動先のページで下記のように次にやることを教えてくれます。

Global setup:

  Download and install Git
  git config --global user.name "Your Name"
  git config --global user.email "Your email"  #->登録したemailアドレスが入ってる
        

Next steps:

  mkdir test  #->リポジトリ名
  cd test     #->リポジトリ名
  git init
  touch README
  git add README
  git commit -m 'first commit'
  git remote add origin git@github.com:tatsuo/test.git  #->アカウント名/リポジトリ名.git
  git push origin master
      

Existing Git Repo?

  cd existing_git_repo
  git remote add origin git@github.com:tatsuo/test.git  #->アカウント名/リポジトリ名.git
  git push origin master
      

Importing a Subversion Repo?

  Click here
      

When you're done:

  Continue

上から順に必要なコマンドを実行しましょう。
僕はRailsで作ったプロジェクト「test」を入れたいので、プロジェクトフォルダに移動して

  git remote add origin git@github.com:tatsuo/test.git  #->アカウント名/リポジトリ名.git
  git push origin master

うーん、簡単ですね!