Git基本命令
git clone 克隆代码
git branch 分支
git status 当前分支及其操作记录
git diff 代码更改记录
git checkout 检出|切换分支
git add 添加新建文件
git commit -am "提示信息:提交所有修改"
git push origin master|branch-new 推送远程分支
在git的基本命令中是没有分支的重命名rename命令的,当然说的是对应的远程分支的删除;由于权限或者操作的不方便,没有办法直接使用命令rename远程Git分支,但是可以曲线救国的方式实现分支的重命名的效果:
git branch -av
git push --delete origin branch-first
git branch -m branch-first my-branch
git push origin my-branch
总结汇总流程:
删除远程分支->重命名本地分支->提交本地分支