0

I am not a git expert, let's get that out of the way early.

However, it is my understanding that commits belong to branches.

Further, tags are just a group of commits (or a point in the tree) that has a special name.

However another developer I work with seems to be able to make tags (on GitHub) consisting of commits which do not appear on any branch - how is this possible? It makes development difficult because a bunch of the work being done is essentially invisible to me.

2
  • A branch is a pointer into the graph, just like a tag is. (It just happens to move.) What do you mean by "work being done is essentially invisible to [you]"? Sep 7, 2016 at 19:23
  • @EdwardThomson I mean there is no record of it in git log --all or on GitHub (not even the tag) except from the Dashboard. Sep 7, 2016 at 19:25

1 Answer 1

2

Branches and tags are nearly identical.

Both consist of a reference to a commit. You can commit to a branches and it is automatically updated, you can't commit to a tag, but only because the software doesn't do that. You could do it your self by hand.

To make a tag that points to commits that a branch does not. Make a tag that points to the head of the branch, and then delete the branch, The tag and commit and all the objects they reference remain. This may be his way of indicating that that branch is completed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.