git branch - Git: committing to a tag and then merging commit to master -
i'm familiar svn. have been using git while, haven't done things extremely advanced. project, have been creating tags mark individual releases. example, have tag called v1.2.3
particular release of project. want commit bugfix tag , merge master. how go doing that? looked info creating branch tag, not sure if that's right way of doing it. can commit straight tag , merge master?
committing tag exclusively wrong, in opinion, although svn, design allows it.
say, have release v1.2.3 , commit tag - what? still v1.2.3 or 1.2.3a or that? how recover version 1.2.3 later on?
nevertheless, in git can recreate tags. not sure if should other case "i accidentally tagged wrong version" or in case have "moving" tags "last stable revision".
in git do:
git branch v1.2.3-bugfix v1.2.3 [v1.2.3-bugfix branch, v1.2.3 tag] git checkout v1.2.3-bugfix -- changes -- git add together ... git commit git tag -f v1.2.3
that is, first create branch starting tag. check out branch (there shortcut via git checkout -b). commit changes , re-create tag.
afterwards, delete bugfix-branch.
git git-branch git-merge git-tag
No comments:
Post a Comment