1

I recently pushed a commit and moved a previous tag onto it with the push.

git add -A .
git commit -m "made changes and moving previous tag to this commit"
git tag -a {previous-tag} -f
git push --tags -f

When using git log it shows the commit, but at my git repo page, it doesn't show the commit. How can I fix this?

Edit: The most recent commit shown on my Github page is the commit that the tag was originally on.

Edit 2: Also, Composer pulls in the correct commit (the newer one that the older tag was pushed to). I'm not pulling dev-master.

Update:

I'm not sure what the problem was but I pushed a test commit (without moving tag) and suddenly the previous two commits that did not show are showing up now (timestamp of the problem commit was hours ago).

Jeff
  • 2,018
  • 2
  • 15
  • 18
  • 1
    HEAD refs won't get pushed, meaning that you ONLY push the tag only not code. – MrYo Sep 22 '15 at 04:41
  • No, pulling the package via composer pulls the most recent commit (the actual most recent commit). Edit: also I'm not pulling dev-master, I'm pulling that tag version. – Jeff Sep 22 '15 at 04:43

1 Answers1

2

Unless you are using git push --follow-tags (git 1.8.3+), you have pushed only the tag, not the branch HEAD.

A pull will pull that tag, and reference that commit.
But until you push the branch HEAD (which you did by pushing a test commit), you won't see that tagged commit on the remote repo.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250