git基础概念

2012-11-28 00:00

GitHub

Setup

git config --global user.name "rock"
git config --global user.email "roc.bie@gmail.com"
Setup SSH key
setup user info
clone repo

install brew

/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"

常用命令

概念

Git目录
工作目录
Git索引-staging Area-暂存区-git status

git clone git://git.kernel.org/pub/scm/git/git.git
git init
git add
git diff
git diff --cached
git commit
git commit -a

git branch

git push/pull
git remote add origin git://......//git.git

Tags: git dev