Code management in the general development process
1. Download the code from the repository
git clone ssh://[email protected]192.168.1.3: 29418/mustang-web
2. Open a new branch for a feature (e.g. Instance-lanuch)
CD Mustang-web
Git checkout-b instance-lanuch
One sentence: Each time from master synchronization code, it is best to perform Pip Install-r Requirments.txt, to ensure that the new library is installed
You can view the currently owned branch git branch
3. Modify the code in Instance-launch, such as Add, edit, delete, etc.
4. Submit to the local code base
git Add.
Git commit-m ' instance launch feature '
5. Submit the code to Gerrit for everyone review
Because there are many people in the collaborative development, there will be the main branch Master Update more frequently, your Instance-lanuch branch based on the master branch is possible and outdated, so before committing to Gerrit need to resolve some code conflicts
Run git rebase master first to see if there is a conflict, if any, after resolving the conflict git rebase--continue
Git review commit to Gerrit
6. When the review is complete, your code will be merged into the master branch master
Update to local Master branch
git checkout Master
Git pull
7. When developing the next feature, start with step 2
Note:
Profile: http://blog.jobbole.com/25775/
Code management in Git's general development process