[GitHub[ GitHub 入門
GitHubアカウントを生成
https://github.com/で新しいアカウントを作成した
Git - Download
先ずは各OS別にgitをインストールする。
各OS別のダウンロードページ
http://git-scm.com/downloads
$ apt-get install git
- apt-getが有るならこれでOK
Set Up Git
インストールが終わったら、基本設定を行う
$ git config --global user.name "Your Name Here" $ git config --global user.email "your_email@example.com"
- 作業者情報を設定する事になる
- 参考:https://help.github.com/articles/set-up-git
Password caching
公開キー生成方法の登録
$ curl -s -O \ http://github-media-downloads.s3.amazonaws.com/osx/git-credential-osxkeychain $ chmod u+x git-credential-osxkeychain $ sudo mv git-credential-osxkeychain \ "$(dirname $(which git))/git-credential-osxkeychain" $ git config --global credential.helper osxkeychain
新しいレポジトリを作成
レポジトリの作成はGitHubのWebページ上で行う
生成結果としてはレポジトリアドレスが生成される
- https://github.com/{ユーザid}/{レポジトリ名}.git
- git@github.com:{ユーザid}/{レポジトリ名}.git
使い方としては
$ git remote add origin https://github.com/{ユーザid}/{レポジトリ名}.git $ git remote add origin git@github.com:{ユーザid}/{レポジトリ名}.git
- originはブランチ名としてオリジナルを示す