1、查看远程分支
$ git branch -a
2、查看本地分支
git branch
3、切换分支
git checkout master
4、删除缓存区.idea(保留工作区.idea)
$ git rm --cached -r .idea
$ git rm --cached -r *.iml
# 将.idea从源代码仓库中删除(-m 表示备注)
$ git commit -m "commit and remove .idea"
# 推送到远程端
$ git push origin master
转载于:https://my.oschina.net/tyro/blog/3016759