初始化:
git config --global user.name "Your Name"
git config --global user.email XXXX@mail.com
上传与管理
git init
git add -u work tree->index tree
git commit -m 'first commit' index tree->repos tree
git remote add origin git@github.com:drf1234/wiloc_test2.git origin=URL
git push -u origin master 上传至master分支
LOCAL
git status
修改代码后:
git commit -a -m 'n rd commit' work tree->index tree ->repos tree
REMOTE
git push
一般直接使用git push来传递到remote 库
git remote -v
git remote add 'remote name' 'URL' such as
git remote add origin git@github.com:drf1234/wiloc_test2.gitgit push -u 'remote name' 'branch name'
git push -u origin master
参考资料:
http://hi.baidu.com/jiyeqian/blog/item/d8f5f108ff0f0f2ce824884b.html