1.查看所有分支 git branch -a
2.新建分支 git branch newbranch
3.使用分支 git checkout newbranch
4.修改文件
5. git add .
6. git commit -m "new branch added "
7. git push -u origin newbranch
8. 查看所有分支情况 git branch -a
修改分支名称
git branch -m oldname newname
git push origin :oldname 删除旧分支
git push - u origin newname
删除分支
1.查看分支 git branch -a
2. 查看当前分支 git branch
3. 删除本地分支 git branch -d branchname
4. 删除远程分支 git push origin --delete branchname
合并分支
1.切换到主分支 git checkout master
2.合并分支 git merge refreshedBranch
3. git commit -m " merge new branch"
4. git push -u origin master