git-flow使用

来源:互联网 发布:冰点下载器 mac版 编辑:程序博客网 时间:2024/06/04 18:58

使用git flow

1、创建develop分支

git branch developgit push -u origin develop

2、创建自己的分支

git checkout -b test develop (test为创建的分支名)

3、切换到test分支

git checkout test

4、提交代码到test分支

git add .git commit -ngit push --set-upstream origin test

5、合并到develop分支

git pull origin develop(合并前确保develop分支最新)git checkout develop(切换到develop分支)git merge test(将develop分支与test分支合并)git push(合并之后提交)git branch -d test(删除test分支)

6、删除远程分支

git push --delete origin test