I was getting a confusing error message after trying “git pull” about no matching ref spec, as if “git pull origin master” was asking for an invalid branch. Turns out my SSD partition was full after saving a bunch of travel photos. Is it best-practice to do “git clone” again after this, since presumably the git state would have failed to save?
After freeing up some space, it just says “already up-to-date” but this may lead to bad things down the road. If not, (1) would this be a worse situation if there actually were modifications locally and more generally (2) how robust are git, svn, cvs in general to a fail-to-write issue like this?
No, with local modifications the situation would be the same, because (which is a kind of rule of thumb in Git) there are no modifications made on existing objects. Every time when sometimes is changed in a repository a new object is created.
History of that changes can be displayed using
git reflog, and it’s very helpful in solving problems with the local repository.Also, Git has a
git fscktool for checking if any Git database object is corrupted.See the manpage: http://man.he.net/man1/git-fsck