I have become increasingly fond of Git. Because it’s a distributed versioning system, I can just start a repository on my computer and not worry that the new repository has now suddenly become the “master” copy. In addition, the entire history of the repository is available with every copy, making it easy to commit at your leisure and rollback to any past changes. Besides that, there are plenty of other advantages with Git too that you can find lists of on the Internet. With this new found love, I’ve started putting everything that I feel could use some versioning into Git repositories.
The only and major downside to Git is that there is a lack of software support. For a long time, you had to stick to command line utilities or very mediocre attempts at a GUI. However, the good news, for Windows users, is that TortoiseGit seems to be improving at a promising rate.
On a related note, I set up gitosis on a server today, but I ran into a bit of trouble. I’m not sure whether it is related to the particular snapshot I got of gitosis, whether it is something wrong with the Python version installed, or whether it’s because it’s FreeBSD, but I was receiving a very annoying gitosis.repository.GitReadTreeError: git read-tree failed: exit status 128 error. I dug through the code and noticed that a call to shutil.rmtree was changing the current working directory of the script (to who knows what). I put lines around that portion in run_hook.py to remember the current working directory and restore it after the call to temporarily fix it.
I'm on Twitter!
Just wondering if you ever found a real fix for this? I’m having the same issue. Thanks.
Yeah. You need to find shutil.rmtree somewhere in gitosis’ files, then add before it:
current_dir = os.getcwd()
Then after that, add:
os.chdir(current_dir)
Thanks, you have saved my life with this comment. Took me hours to install the thing, must be a bug in the distribution?
Could also be a bug in Python, since shutil is a Python-distributed module, although I imagine someone would have caught it by now.