2012年3月19日月曜日

github使ってみた

今更だけどgithub使ってみたときのメモ
とりあえず初期設定は下記参考リンク見ながらやればOK

以下はリポジトリの作成→アップロードまで簡易版のメモ
  1. gitの設定
  2. 名前とe-mailを設定
    git config --global user.name "Firstname Lastname"
    git config --global user.email "your_email@youremail.com"
    
    githubのユーザーIDとアクセストークンの設定 ※アクセストークンはAccount Settings→左メニューのAccount Settingsで見れる
    git config --global github.user username
    git config --global github.token 0123456789yourf0123456789token
    
  3. sshの設定
  4. .ssh/configに以下を書いておく
    Host github.com
            User git
            Hostname github.com
            IdentityFile ~/.ssh/YOUR_PRIVATE_KEY
    
  5. リポジトリの作成
  6. githubにログインして"New Repository"を押せばOK
  7. リポジトリにpush
  8. mkdir repname
      cd repname
      git init
      touch README
      git add README
      git commit -m 'first commit'
      git remote add origin git@github.com:yourid/repname.git
      git push -u origin master
    

感想
コマンドから簡単にWebのホスティングサービスにアップロードできるのは超便利
ただし、非公開のリポジトリは無料ユーザーでは作れないので注意すること


リポジトリの削除はこちらに書いてある通り、リポジトリを開いてAdminから行える 参考リンク
github 超入門
github もうちょい入門
http://help.github.com/win-set-up-git/

0 件のコメント: