- git add ***
- git commit -m '备注'
- git push
- git checkout -b develop1.0 origin/develop1.0
- 拉取develop1.0的远程分支到本地并命名develop1.0 ,创建关联关系。
- 举例:git checkout -b 本地分支名x origin/远程分支名x
- git branch -a
- git branch develop
- git checkout develop
- git push --set-upstream origin develop
- 在分支基础上创建分支:
- 参考:
- git checkout current_branch 切换到当前分支current_branch
- git pull 拉取最新的
- git checkout -b new_branch 基于当前的分支,创建new_branch分支
- git push origin new_branch 推送到线上
- 举例:
- 在指定的分支上创建新分支
- git checkout -b develop2.0
- git push origin develop2.0
- 修改分支名-并推送:
- git branch -m oldBranchName newBranchName
- 重命名: git branch -m develop3.0 release3.0
- 推送到远程:git push --set-upstream origin release3.0
- 删除本地分支:git branch -d develop
- 删除远程分支:git push origin --delete develop3.0