git 命令:
git checkout -b 分支名:新建并切换到新分支。
git branch: 查看当前分支。
git checkout 分支名:切换分支(已有分支)。
git branch -d 分支名:删除分支。
git pull:拉取分支最新内容。
git merge develop:将本分支内容合并到 develop 分支上。
git reset --hard origin/当前分支名:将当前分支本地编辑的所有内容舍弃。
提交的时候:
git add .
git commit -m "描述提交的内容"\
git push
查看分支
git branch #列出**本地**所有的分支
查看分支详细信息
git branch -v #列出本地所有的分支, + hash 信息
查看分支与远程的关联
git branch -vv #列出本地所有的分支, + hash 信息 + 与远程的关联信息
查看所有分支
git branch -a #列出所有的分支(远程和本地)
原文:https://www.cnblogs.com/xzjf/p/14252013.html