Skip to content

Instantly share code, notes, and snippets.

@zerodie
Last active December 17, 2015 17:29
Show Gist options
  • Save zerodie/5645944 to your computer and use it in GitHub Desktop.
Save zerodie/5645944 to your computer and use it in GitHub Desktop.
git flow and merge pull request commands
//開始git flow init
zerodie@ChiaChia-Lees-MacBook-Pro ~/g/pagamO> git flow init [2:36:25 on 13-05-25]
//以下一直按enter
Which branch should be used for bringing forth production releases?
- develop
- feature/account_management
- master
Branch name for production releases: [master]
Which branch should be used for integration of the "next release"?
- develop
- feature/account_management
Branch name for "next release" development: [develop]
How to name your supporting branch prefixes?
Feature branches? [feature/]
Release branches? [release/]
Hotfix branches? [hotfix/]
Support branches? [support/]
Version tag prefix? []
//我要merge別人的pull request回develop branch:
zerodie@ChiaChia-Lees-MacBook-Pro ~/g/pagamO> git checkout -b feature/account_management -t origin/feature/account_management [1:57:49 on 13-05-25] //這是把remote branch抓下來並切換到他
Branch feature/account_management set up to track remote branch feature/account_management from origin.
Switched to a new branch 'feature/account_management'
zerodie@ChiaChia-Lees-MacBook-Pro ~/g/pagamO> gb [2:36:22 on 13-05-25]
develop
* feature/account_management
master
zerodie@111-240-220-88 ~/g/paGamO> git merge develop feature/account_management
Already up-to-date. //確認現在develop branch是最新的
zerodie@111-240-220-88 ~/g/paGamO> gco develop feature/account_management
Switched to branch 'develop' //到develop準備merge
zerodie@111-240-220-88 ~/g/paGamO> git merge --no-ff feature/account_management develop //把feature branch merge回develop 並保留節點(The --no-ff flag causes the merge to always create a new commit object, even if the merge could be performed with a fast-forward.)
Updating 43c5863..b802ce9
Fast-forward
.gitignore | 2 +-
Gemfile | 3 +++
Gemfile.lock | 13 +++++++++++++
3 files changed, 17 insertions(+), 1 deletion(-)
zerodie@111-240-220-88 ~/g/paGamO> git push origin develop
Username for 'https://github.com': zerodie
Password for 'https://zerodie@github.com':
Total 0 (delta 0), reused 0 (delta 0)
remote: This repository moved. Please use the new location:
remote: https://github.com/zerodie/PaGamO.git
To https://github.com/darkbtf/PaGamO.git
43c5863..b802ce9 develop -> develop
成功 :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment