git branch 操作
查看分支 git branch 或 git branch -v
创建分支 git branch develop
切换分支 git checkout develop
删除分支 git branch -d develop(如果没有合并到主分支会报错) git branch -D develop(强制删除)
合并分支
1. 切换到master分支下: git checkout master
2. 合并分支: git merge develop
3. 提交到远程仓库: git pull origin master
git rm --cached [filename] 删除远程文件
初始化: git flow init
开始新Feature: git flow feature start MYFEATURE
Publish一个Feature(也就是push到远程): git flow feature publish MYFEATURE
获取Publish的Feature: git flow feature pull origin MYFEATURE
完成一个Feature: git flow feature finish MYFEATURE
开始一个Release: git flow release start RELEASE [BASE]
Publish一个Release: git flow release publish RELEASE
发布Release: git flow release finish RELEASE
别忘了git push –tags
开始一个Hotfix: git flow hotfix start VERSION [BASENAME]
发布一个Hotfix: git flow hotfix finish VERSION
网友评论