What to do if the git tags and branches have the same names?
PHP中文网2017-05-02 09:41:39
0
2
1327
For example, there is a tag called v1 and a branch also called v1, but they point to different commits. How do I distinguish the tag and branch when I checkout?
First of all, be sure not to use tags and branches with the same name. This will put the entire project team into the dilemma of "can you tell whether I am male or female".
"Unified naming standards are important! Unified naming standards are important! Unified naming standards are important!"
I really don’t know how to name it more appropriately. You can refer to Git FLOW
In addition, if there is a duplicate name, there are two ways to rebuild a branch with a meaningful name to solve the problem
First of all, be sure not to use tags and branches with the same name. This will put the entire project team into the dilemma of "can you tell whether I am male or female".
"Unified naming standards are important! Unified naming standards are important! Unified naming standards are important!"
I really don’t know how to name it more appropriately. You can refer to Git FLOW
In addition, if there is a duplicate name, there are two ways to rebuild a branch with a meaningful name to solve the problem
git checkout tags/v1