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?
为情所困2017-05-02 09:43:39
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 -b new_branch old_branch
git checkout -b new_branch <sha1>