Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 849 Bytes

File metadata and controls

33 lines (26 loc) · 849 Bytes

Branch off tag

To branch off a specific tag in Git, follow these steps:

1. Fetch the latest tags (if needed)

If you don’t already have the latest tags from the remote repository, run:

git fetch --tags

2. List available tags (optional)

git tag

3. Create a new branch from the tag

Replace <tag_name> with the actual tag you want to branch from:

git checkout -b <new_branch_name> <tag_name>

or using the newer git switch command:

git switch -c <new_branch_name> <tag_name>

4. Push the new branch to the remote (if needed)

git push origin <new_branch_name>

Now, your new branch starts from the tagged commit, and you can start making changes.

Would you like additional details on handling branches from tags?