2690

MacOSXでGithubを使う-2

MacOSXでGithubを使う-2

2011.6.26

前回「MacOSXでGithubを使う-1|1bit::memo」に引き続いての作業です。

確認環境

Gitをインストール

Gitのインストールには、MacPortなどいろいろな方法があるそうですが、ここでは「git-osx-installer」というソフトを使います。
Downloads – git-osx-installer – OSX Installer for Git – Google Project Hosting」から最新版のインストーラをダウンロードします。お使いのMacが64bit対応でなければ「git-1.7.5.4-i386-leopard.dmg 」でいいと思います。

ファイルを解凍し、インストーラを実行してください。このソフトはアプリケーションフォルダに入るタイプのソフトではありません。そのため、アプリケーションフォルダを探してもアプリ本体は見つかりませんが、気にしなくていいです。

ターミナルを起動して作業

/アプリケーション/ユーティリティ/ターミナル.appを起動します。以下のコマンドを入れてみてください。

git 少し長いですが以下のように表示されれば、無事インストールできています。

usage: git [--version] [--exec-path[=]] [--html-path]
           [-p|--paginate|--no-pager] [--no-replace-objects]
           [--bare] [--git-dir=] [--work-tree=]
           [-c name=value] [--help]
            []

The most commonly used git commands are:
add Add file contents to the index
bisect Find by binary search the change that introduced a bug
branch List, create, or delete branches
checkout Checkout a branch or paths to the working tree
clone Clone a repository into a new directory
commit Record changes to the repository
diff Show changes between commits, commit and working tree, etc
fetch Download objects and refs from another repository
grep Print lines matching a pattern
init Create an empty git repository or reinitialize an existing one
log Show commit logs
merge Join two or more development histories together
mv Move or rename a file, a directory, or a symlink
pull Fetch from and merge with another repository or a local branch
push Update remote refs along with associated objects
rebase Forward-port local commits to the updated upstream head
reset Reset current HEAD to the specified state
rm Remove files from the working tree and from the index
show Show various types of objects
status Show the working tree status
tag Create, list, delete or verify a tag object signed with GPG

See 'git help ' for more information on a specific command.

次はSSH公開鍵の設定方法です。