Nine, Git-- workflow (Eclipse branching operation)

A, git workflow.

1 concept : a way to use Git in the project development process

2 git workflow classification

1) Centralized workflow (work using less)
as SVN as a centralized workflow item as the central repository for all modifications single point entity. All
modifications are submitted to the Master of this branch.
In this way the main difference is that the developer has a local SVN repository. Git many features and not used.
Here Insert Picture Description
2) GitFlow workflow
Gitflow workflow through functional development, release preparation and maintenance set up an independent branch, so publishing
iterative process smoother. Strict branching model also provides some very necessary structures for large projects.

Here Insert Picture Description
. 3) Forking workflow
Forking GitFlow workflow is based on the full use and Fork Git pull request of the
function to achieve the purpose of the code review. More suitable for securely managing a large team of developers, but also to accept the
submission of mistrust contributors.

Here Insert Picture Description
3 GitFlow Workflow Detail

1) the type of branch
a) main branch master
production code is responsible for managing the running. Always keep a running production environment
exactly the same.
b) develop development branch
responsible for managing the code is in the process of development. Under normal circumstances should be the latest code.
c) bug fix branch hotfix
is responsible for managing the emergency repair of appearing in a production environment code. Separate the branch from the trunk, repair
processing is completed and tested on the line, and branch back to the trunk. After back and, as the case may be to remove the branch.
d) production-branch (branch pre-release) release
before a larger version of the line will separate the quasi-production branch, the final stage of the development branch set
to test. After the on-line version, will be merged into the trunk branch. After running for some stages of the production environment is more stable
as the case may be deleted.
e) a branch function feature
in order not to affect the development of a short cycle, the long-term development module generally, will develop from the branch
independent of. Will be merged into the development branch development is completed.
Here Insert Picture Description
4 eclipse branch combat
Here Insert Picture Description
specific operation

  1. Create and switch branch (L developer of operation)
    operation path for the master project right -Team-Swich To-New Brach
    add the name of the branch hot_fix, after the completion of switching to a new branch
    Here Insert Picture Description
    make changes in the new branch, and then added to the staging area ( mouse drag / team-add to index) submitted to the local library
    push to a remote repository (team-remote-push- fill in the remote database http address and the username and password), then a remote library has master, hot_fix two branches

2) switching hot_fix branch review of the code (Y developer of operation)
project right -Team-Switch To-Other-Remote Tracking-hot_fix branch, checkout the local
Here Insert Picture Description
Here Insert Picture Description
detection of new remote branch
Here Insert Picture Description
after branch code review hot_fix satisfaction (dissatisfied modify submitted to remote until satisfied), switch back to the master
Here Insert Picture Description
merge branches (do merge in the trunk on the basis of master)
the right to select the combined -team-Merge- Master Engineering branch (hot_fix)
Here Insert Picture Description
consolidated results
Here Insert Picture Description
after the merger is successful, push to the master remote.
Project Right -team-remote-push- fill in the address http username and password - Click the middle button to pop add
at this time remote repository of master code gets merged

Guess you like

Origin blog.csdn.net/m0_38143867/article/details/92798929