« The Problem of Time in the Wheeler-DeWitt Equation, and Dark Energy | Main | コンピュータが本来持つ限界のなさを阻む者はきっと・・・ »

Xcode 5でgit、とりあえずこれだけ覚えよう

これだけでとりあえずの用は済んでいるという話です。branchの切り替えとかcommitはXcodeから出来るので覚える必要ないし。OSは 10.8 と10.9、Xcode 5。

まずはインストール。webを見るとgitのインストールから紹介しているところがありますが要りません。Xcodeにはgitが含まれているので、パスを通すだけで良いです。$HOME/.profileに以下を足します。
export PATH="$PATH:/Applications/Xcode.app/Contents/Developer/usr/bin/"
あとはterminal.appで当該ディレクトリに移動して使います。

コミットをアンドゥしたいときは: git reset HEAD~1
最近のcommitを見たい時は: git log
ブランチのリストは: git branch
ブランチを削除したい時は: git branch -d ブランチ名
ただし、mergeしてないブランチを消滅させたい時は: git branch -D ブランチ名

お役立ちのサイトは:
サルでもわかるGit入門
Git Book

|

« The Problem of Time in the Wheeler-DeWitt Equation, and Dark Energy | Main | コンピュータが本来持つ限界のなさを阻む者はきっと・・・ »

Comments

The comments to this entry are closed.

TrackBack


Listed below are links to weblogs that reference Xcode 5でgit、とりあえずこれだけ覚えよう:

« The Problem of Time in the Wheeler-DeWitt Equation, and Dark Energy | Main | コンピュータが本来持つ限界のなさを阻む者はきっと・・・ »