OK, this is more a question to help me understand git internals than an 
actual problem that I am having. But suppose I create a new branch. "git 
checkout -b newbranch". I am now in the "newbranch" branch. So I create a 
new file in my working directory such as: "date >ldate". I now have ldate 
in my working directory. I do: "git add ldate" and "git commit -m 'added 
ldate to track last date'". The contents of ldate are kept in a git object 
whose name is the sha1sum of the contents. I now decide this is silly. So I 
want to eliminate "newbranch". The simpliest way, not having done a "git 
push" is to just kill it with "git branch master;git branch -D newbranch". 
Now, after this, is the git object for the now non-existent ldate file 
already cleaned up? Or do I need to do something else, such as "git gc", 
"git prune"? I'm pretty sure that the "git gc" is the best bet.


Reply via email to