The difference is that tags are meant to be immutable, while branches are made to be changed. Not a big difference, but if someone makes a mistake, it might be the difference between "we can rollback to this safe version" and "I have no idea what was on production before we made the release :(".
Yes. A tag is a pointer to a specific commit. Obviously, every ancestor of that commit is reachable from that tag (that's what creates the history). A branch is just another pointer to a commit (with the difference being that is moves automatically when you create a new commit while on that branch, while tags are (conceptually at least) immutable), so it obviously sees the same history as the tag.
2
u/Cwiddy Jun 19 '15
I am not overly familiar with Git other than simple personal use (still in a SVN shop) but just to clarify for myself in get,
you can branch
do a bunch of things
tag the branch?
merge to master
delete branch.
So my questions are when you delete a branch you tag you still get the history to that tag, that is what you said above I think.
And then when you branch from a tag it has it's full history to that point?