Skip to content

Latest commit

 

History

History
64 lines (44 loc) · 1.5 KB

File metadata and controls

64 lines (44 loc) · 1.5 KB

Git Tricks

Using git-flow to automate your git branching workflow

from https://jeffkreeftmeijer.com/git-flow/ and https://github.com/nvie/gitflow/

install

# on centos
curl -OL https://raw.github.com/nvie/gitflow/develop/contrib/gitflow-installer.sh
chmod +x gitflow-installer.sh
INSTALL_PREFIX=/path/to/install/git-flow ./gitflow-installer.sh

# add /path/to/install/git-flow to PATH

init

To initialize a new repo with the basic branch structure, use:

git flow init [-d]

Creating feature/release/hotfix/support branches

To list/start/finish feature branches, use:

git flow feature
git flow feature start <name> [<base>]
git flow feature finish <name>

To push/pull a feature branch to the remote repository, use:

git flow feature publish <name>
git flow feature pull <remote> <name>

Summary of git flow feature start:

  • A new branch ‘feature/<name>’ was created, based on ‘develop’
  • You are now on branch ‘feature/authentication’

Summary of git flow feature finish:

  • The feature branch ‘feature/<name>’ was merged into ‘develop’
  • Feature branch ‘feature/authentication’ has been removed
  • You are now on branch ‘develop’

To list/start/finish release branches, use:

git flow release
git flow release start <release> [<base>]
git flow release finish <release>

[返回首页]