Generally, there are several branches: master develop, various feature branches, bug_fix branch, hot_fix branch
Master is generally the official online version. Needless to say, develop is developed, but the branch placed in develop is already a relatively stable branch. When you want to develop new features, make sure you create a new feature_XXX branch on the develop branch. Various commit commit commit,
If a bug is found in the previous version later, a bug_fix_XXX branch will be created if it does not affect the online version, and a hot_fix branch will be created for serious bugs that affect the online version. hot_fix is different from bug_fix. After the bug is solved, the hot_fix branch will be merged to the master. It's master.
Also, if you want to keep your branch neat and clean, you may need to use rebase to merge the code instead of merge
For git stuff, I recommend checking out progit, it’s very comprehensive.
Even if you just add a line of code, it can be treated as a commit.
Do not submit irrelevant code to this commit.
You need to know that the effect you want to achieve is that if one day I want you to roll back to a certain historical state, you can quickly find that submission and roll back. If you can't do this, it doesn't matter how you commit.
For example, once you change a default value from 50 to 100, then this should be treated as a commit. If you fix a bug by accident, it cannot be included in this commit. Otherwise, how can you roll it back to 50? Do you need to fix the bug again after rolling it back?
You don’t know how to submit because you don’t have a definite purpose.
If you want to be very detailed, you can only submit a specific function.
But it’s so troublesome.
In addition, you can also use git gui to submit in Chinese and describe it clearly.
This is optional. It is mainly for the convenience of yourself or others in the future. I will also make it clear in the commit information of your commit information that you have changed those pages that have nothing to do with the function. Anyway, if you are diligent in committing, submitting a feature once is definitely not enough
You can refer to git flow. I think it can solve your doubts from a big point
http://danielkummer.github.io/git-flow-cheatsheet/index.zh_CN.html
Generally, there are several branches: master develop, various feature branches, bug_fix branch, hot_fix branch
Master is generally the official online version. Needless to say, develop is developed, but the branch placed in develop is already a relatively stable branch. When you want to develop new features, make sure you create a new feature_XXX branch on the develop branch. Various commit commit commit,
If a bug is found in the previous version later, a bug_fix_XXX branch will be created if it does not affect the online version, and a hot_fix branch will be created for serious bugs that affect the online version. hot_fix is different from bug_fix. After the bug is solved, the hot_fix branch will be merged to the master. It's master.
Also, if you want to keep your branch neat and clean, you may need to use rebase to merge the code instead of merge
For git stuff, I recommend checking out progit, it’s very comprehensive.
I usually am
Even if you just add a line of code, it can be treated as a commit.
Do not submit irrelevant code to this commit.
You need to know that the effect you want to achieve is that if one day I want you to roll back to a certain historical state, you can quickly find that submission and roll back. If you can't do this, it doesn't matter how you commit.
For example, once you change a default value from 50 to 100, then this should be treated as a commit. If you fix a bug by accident, it cannot be included in this commit. Otherwise, how can you roll it back to 50? Do you need to fix the bug again after rolling it back?
You don’t know how to submit because you don’t have a definite purpose.
I think so.
If you want to be very detailed, you can only submit a specific function.
But it’s so troublesome.
In addition, you can also use git gui to submit in Chinese and describe it clearly.
This is optional. It is mainly for the convenience of yourself or others in the future. I will also make it clear in the commit information of your commit information that you have changed those pages that have nothing to do with the function. Anyway, if you are diligent in committing, submitting a feature once is definitely not enough
Use rebase more and merge less