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
使用git-flow创建和发布git项目
最新推荐文章于 2023-05-17 09:08:59 发布