mark下一些常用命令

git add .   //添加新文件或者更改新文件

git remove  **   //删除文件

git commit -m 'by who do what'  //提交文件到本地

 

git remote add upstream https://github.com/XXX/XXXX.git    //新建分支用于存放别人的repository

git clone https://github.com/XXX/XXX.git  //克隆到本地

git fetch branch2  //更新信息

git merge branch2/master    //merge本地信息

git push  push到服务器上

git pull origin master 从服务器上拉取信息

git remote  查看repository上的所有分支

git branch -a  查看所有分支

git branch -r 查看远程分支

git branch -d *** //删除分支

git branch *** //新建分支

git checkout ***//切换分支

git status //查看状态

git log //查看提交修改记录

 

http://www.oschina.net/question/1397765_166368

http://blog.chinaunix.net/uid-26185912-id-3332628.html

posted on 2015-08-25 17:13  NealCaffrey989  阅读(215)  评论(0编辑  收藏  举报