search

Home  >  Q&A  >  body text

git: a bug-fixed branch built based on the local master, best practice in actual scenarios

Git: Fixbug is a bug-fixing branch built based on the local master. What is the best practice in actual scenarios?
ps: The remote master has permissions for multiple people.
The operation of this process in the actual production environment is a bit confusing:
First type:

  1. git checkout fixbug

  2. git add .

  3. git commit -m '...'

  4. git checkout master

  5. git pull origin master

  6. git merge fixbug

  7. master put for testing

  8. Testing OK

  9. git pull origin master

  10. master is online

Second type:

  1. git checkout fixbug

  2. git add .

  3. git commit -m '...'

  4. git checkout master

  5. git pull origin master

  6. git checkout fixbug

  7. git merger master

  8. fixbug put in test environment for testing

  9. After the test is OK,

  10. git checkout master

  11. git pull origin master

  12. git merge fixbug

  13. git push -u origin master
    13.master online

Third type:
What’s your suggestion?
Crab!

过去多啦不再A梦过去多啦不再A梦2781 days ago731

reply all(1)I'll reply

  • 天蓬老师

    天蓬老师2017-05-02 09:53:17

    The second feeling is that there is a logical loophole. After the ninth release test was completed, I reconciled with the master again. If there are changes in the code, I have to test it again.

    If the project is complex and multiple people are developing it in parallel, then there should be a mediator. After other programmers make a pull request, the moderator needs to review the code before determining whether to merge it with the remote master.

    General projects do not have a mediator, so the mediator is you. Just review it yourself.

    reply
    0
  • Cancelreply