github分支参考学习:
git 分支命令
http://blog.csdn.net/arkblue/article/details/9568249
git 分支讲解
http://www.open-open.com/lib/view/open1328069889514.html#articleHeader1
git 分支合并等命令
http://hbiao68.iteye.com/blog/2055493
- 查看远程分支
$ git branch -a - 查看本地分支
$ git branch
其中 * 代表当前所处的分支 切换当前分支
$ git checkout <分支名字>
删除当前的某个分支
git branch -d <分支名字>把当前分支push到远程分支,这里需要输入github用户名和密码
可以查看到github远程分支有了m2分支
将文件提交到某个分支
此时 master分支,m2分支的内容是不同的
查看分支文件 ,分支状态
$ git status
$ git ls-files
查看和恢复某个分支已删除的文件
$ git ls-files –deleted
$ git checkout <文件名>
查看提交日志
http://www.2cto.com/os/201305/214014.htmlgit 撤销git add添加的文件
$git rm --cached filexx