![]() But these aren't hard-and-fast rules, so do whatever is appropriate for your situation. Later, the only thing you need is to change your merge workflow. The branch is created locally and still needs to be pushed for others to be able to see it. ![]() Or to only create it but stay on your current branch: git branch v1/debug v1/master. If you create a branch from masters current location, your local one will be named my-new-branch-name, and after pushing, the remote version will be origin/my-new-branch-name, assuming your remote is named origin (which, I believe, is the default). Since tag names are usually intended as global (shared across all clones, and everyone's v1.2 will refer to the exact same commit) while branch names are usually intended as local (your debug2 commit is probably different from Fred's debug2 commit), it's generally wise to name tags carefully, and then never change or delete them branch names are more ephemeral and easier to change and delete. To create it and switch to it directly: git checkout -b v1/debug v1/master. You can leave out the refs/ part, using heads/X and tags/X, as well. If you have two guys named Bruce, you can refer to them as Bruce Arthur Robertson and Bruce Leonard Sadler, and now everyone knows which Bruce you mean-and similarly, you can refer to refs/head/X to refer to branch X, and refs/tags/X to refer to tag X. A branch or tag name is a bit like someone's given name. You can also rename a local branch from another branch by using the following two commands: git checkout master git branch -m old-name new-name. In this particular case, some operations resolve the name to the branch name, and some to the tag name.Äeleting one of the names works, of course. Use git branch -m to rename your branch: git branch -m oldname newnameÄ®dit: per question-edit, it seems that you had a branch named X (for some X) and a tag also named X (for some X).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |