您的位置:首页 > 其它

使用git-flow创建和发布git项目

2013-02-26 12:37 555 查看
git clone git@github.com/gitflow.git

cd gitflow/

git checkout -B develop

git push origin develop

## Here are all the branches currently available
git branch -a

## Make sure develop branch is tracking origin/develop
git branch --set-upstream develop origin/develop

## Checkout and track master, you'll need it for git-flow
git checkout -t origin/master

## Now initialize your local repo for git-flow, you can accept all the defaults
git flow init

## Create a feature branch
git flow feature start XXX-999

## publish branch to remote repository
# git flow feature publish XXX-999

git commit -a -m "a message about changes"

## push:  push commits up to remote.  Note: add the "feature/" prefix
git push origin feature/XXX-999

////////////////////////////////////////////////////
//  Finish/Merge
////////////////////////////////////////////////////
git pull

## rebase off the latest develop branch
git rebase develop

## finish the feature
git flow feature finish XXX-999

## delete the branch you published to GitHub
git push origin :feature/XXX-999

////////////////////////////////////////////////////
//  Making a Release
////////////////////////////////////////////////////
git checkout develop

git status

## start the release
git flow release start '1.1.1'

## finish the release
git flow release finish '1.1.1'

## now push them to the remote repository
git push origin master

## make sure tags are pushed as well
git push --tags
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: