OS: OS X 10.8.2 Mountain Lion
Git: 1.8.1
MacBook Proを買ったので、開発環境を作っています。今回はGitを入れましょう。
事前にMacPortsをインストールしておいてください。 → MacPortsのインストールする - @thorikiriのてょりっき
ターミナルを起動して、バージョンを確認します。
$ port search git-core git-core @1.8.1 (devel) A fast version control system
今回はGitの1.8.1をインストールしましょう。
$ sudo port install git-core ---> Computing dependencies for git-core ---> Dependencies to be installed: curl libidn p5.12-error p5.12-term-readkey python27 python_select rsync popt ---> Fetching archive for libidn ・・・(略) ---> Installing git-core @1.8.1_0+credential_osxkeychain+doc+pcre+python27 ---> Activating git-core @1.8.1_0+credential_osxkeychain+doc+pcre+python27 ---> Cleaning git-core ---> Updating database of binaries: 100.0% ---> Scanning binaries for linking errors: 100.0% ---> No broken files found.
問題なくインストールできましたね。
どこかでgit initコマンドなどを打ってみて、.gitファイルが出来ていれば問題ないはずです。
$ mkdir test $ cd test/ $ git init Initialized empty Git repository in /Users/thorikiri/work/test/.git/ $ ls -al total 0 drwxr-xr-x 3 thorikiri staff 102 1 9 19:33 . drwxr-xr-x 7 thorikiri staff 238 1 9 19:33 .. drwxr-xr-x 10 thorikiri staff 340 1 9 19:33 .git