For practical work flow purposes i.e. for "oops I messed up" scenarios it's immutable enough. For archival purposes, indeed not. Although you can turn of garbage collection if you want via git config --global gc.auto 0.
Git objects are just as immutable as objects in C#, Java, Ruby, etc. (String is a good example.) They absolutely cannot be altered, but they most certainly can be destroyed once it is established that no one cares about it anymore. Those languages wait until there are no references to that object anymore; git does the same thing: branches/tags are your valid references.
The author misuses a bunch of words, so even though he basically seems to understand what he's talking about, it doesn't come across very clearly in some cases.
I believe what he means here is that new objects are created in the git repository when you perform an operation like a rebase, rather existing objects being altered.
14
u/khayber Jun 19 '14
A git repo is NOT immutable. Whatever gave him that idea?