github - git: create tag and push to remote: why tag is behind master on remote? -


i did fork bower package on github since need enhancement , mantainers not react pull requests.

i changed bit bower.json (to change name, version , add myself among authors), applied enhancements, added new tag, , pushed (i need new tag since bower repository publish new packages versions on new tags only).
have registered forked package on bower repo, modified name.

i not use branches, avoid complications: on master branch (i'm developer, , user of package...).

so far, under sun.

now, problem (for sure due limited knowledge of git): when have make change on forked bower package, do:

  • apply changes sources
  • mark changes tag: git tag -a v1.2.3 -m "my latest enhancement"
  • commit , push: git add -a && git commit -m "committing latest enhancement" && git push --tags origin master

then, if check repository in github, see master branch updated (with latest enhanements), if switch latest tag (say, "1.2.3"), not up-to-date... way, changes not available bower users (only myself, currently... :-).

how work flow flawed?
how understanding of tags flawed?

it seems tagged first , committed later.

you should first commit work, , when tag it, apply latest commit.

the full flow is:

  • apply changes , then:
  • update bower.json 'version' field

.

git add -a git commit -m "my changes" git tag -a v1.2.3 -m "my last tag" git push --tags origin master 

you can use visual tool such 'gitk' see tag pointing at.


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -