Hi, Alan,

On Aug 16, 2014, at 11:03 AM, Alan W. Irwin wrote:

> Ideas from the git gurus, please.

I think the ongoing concern/discussion of deleting branches in git might be due 
to a lingering svn mindset vis a vis branching.  I could be wrong, but I think 
deleting a branch in subversion also deletes the entire set of commits that 
lived on that branch.  This is not the case at all in git.  In git, "commits" 
are first class objects in their own right, whereas "branches" are just 
pointers (aka references) to commits.  If someone deletes a branch locally, the 
commit pointed to by the branch (before it was deleted) still exists in the git 
repository (as do all of its ancestral commits as well).  Pushing the deletion 
of a branch so that the branch is also deleted in the remote repository is 
possible but not something that can be done by mistake; you really have to 
actively/explicitly delete the remote branch, but again the commits themselves 
are not deleted.

The reflog tracks the local history of where references point in the local 
repository.  This information is inherently local.  Why would anyone but me 
care where my HEAD reference pointed at various points in my workflow?  More 
importantly, if reflog info were not local, how would the histories of "HEAD" 
for multiple developers be reconciled?  What would it mean to anyone anyway?

When I was starting with git (from a CVS/SVN background), the thing that really 
helped me to understand git was reading about the four types of objects that 
git stores (blobs, trees, commits, and tags).  Section 9.2 of the Pro Git book 
covers this material (though I think I first read about it elsewhere):

http://git-scm.com/book/en/Git-Internals-Git-Objects

It's also important to note that tags in git come in two types: lightweight 
tags and heavyweight tags.  Both kinds of tags "point" to a specific commit, 
but lightweight tags are just references (like branches) whereas heavyweight 
tags are first class objects (like commits).  For tagging releases, I far 
prefer heavyweight tags because they include extra metadata that a lightweight 
tag cannot (e.g. who created the tag, when it was created, optional message 
about the tag, optional signing of the tag).

Hope this helps,
Dave

P.S.  Another thing I really like about git is "gitk" which can be used to 
visualize and explore a git repo's history.  Try that with subversion! :-)


------------------------------------------------------------------------------
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to