How to work wit Git correctly?

后端 未结 2 1305
走了就别回头了
走了就别回头了 2021-01-26 07:00

I have used Git for trying out but I\'m pretty sure I don\'t use it correctly.
I would like to know how to use Git to become more professional.
I want to start from fres

2条回答
  •  死守一世寂寞
    2021-01-26 07:48

    Normally master branch is default branch and always need to update it with all codes that are stable. Working Flow looks like -

    • One/more developer create and switch to a new branch from master. Then do changes and test the codes. After completing a task (& also the codes are stable), create a pull request and merge the codes with master branch.

    • Now, master has some new changes and all other developers take (pull) the latest codes of master into their different branches they are working on.

    • When need to release a version of the product, give a tag (e.g. v1.0.0) on a commit in master branch. Then create a new branch (e.g. release-v1.0.0) from that tag and release the product.

提交回复
热议问题