Programming is hard by Stephan Schmidt

Unpleasent Git experience

I’m too stupid for git. I’ve run several SVN servers over the years but a Sunday afternoon isn’t enough for me to get git working.

  • Debian stable has git 1.4, for git init one needs 1.5. Some major reconfigurations later (think Debian backports) and updates and updates I had 1.5 working
  • Lots of “fatal” errors during git configuration on the server, with no helpful explanations
  • The client - MacOS X isn’t any better:git add . is followed by fatal: pathspec '' did not match any files. Perhaps git is only for Linux?

And more problems and more problems and more problems. My first SVN repo took 10min to setup and 10min for configuring the client. Voila. Perhaps git is only for the geniuses out there and I’m stuck in the 90s of SCMs.

Update: No this won’t stop me - yet. Though the thought comes to mind if mercurial would have been a better choice ;-)

Update 2: The server works and is accessible. Now I only need to fix the fatal: pathspec '' did not match any files for my local add and then push the contents to the server. Look here for help with the git backports on Debian.

Update 3: More fun: Updating remote server info PUT error: curl result=22, HTTP code=403

Update 4: I’m getting very very old, see: “I experienced these phenomena first-hand. Git was the first version control system I used, and I grew accustomed to it, taking many features for granted.”. I’ve started with RCS, or the version file system on VMS, 18 years ago.

Update 5: fatal: no matching remote head when cloning a new repository.

Update 6: Everything seems to work now!

If you liked this post, subscribe to my free full RSS feed.
Filed under: Java

You can share this post!
Do you want to tell others about this article? Use the social bookmark icons to submit this artice to the service of your choice. Thanks.

Get free updates by email

If you did like this article you can get free updates with your RSS reader, you can follow me on Twitter or get free update to new posts by email. Enter your email:

 
About the author: Stephan has been working as a head of development and CTO. He has experiences in different technologies since 20 years including Java, Rails and Python. Stephans main field of interest is maintainablity and productivity in software development. Want to know more? All views are only his own.

Comments

Oolis

Git and mercurial don’t need servers. They are distributed, thats the whole point. The most as far as a centralized repository most projects will need is a directory (or directories) on a file server that people can push to and pull from. Other options, for mercurial at least, I believe git offers similar choices, are accessing remote fileshares via ssh, running with a temporary builtin http server, or running from within apache or lighthttpd servers. Neither were for me particulalry more complicated than svn.

I would suggest that if you need a centralized repository why not use svn, and use some of the bridging options so that developers or teams can use distributed vcs for their branching and merging, but the main centralized repo (should you really want such a thing) runs svn.

stephan

“Git and mercurial don’t need servers. They are distributed, thats the whole point. ”

I know. Most projects have one gathering point though. See Github. Most companies need an official repository to integrate and draw releases from - I can’t think about a way to release a website from all distributed developers repos.

“Neither were for me particulalry more complicated than svn.”

Glad for you. See my post for a different experience with Apache2, Debian and git.

A combined Svn-Git setup looks strange to me. I’ll keep trying to setup git on the server for a repo.

Thanks for the insights.

Ouch. Sorry to hear you had a bad experience using git the first time.

Divya

How did you fix the error?
PUT error: curl result=22, HTTP code=403

Jason

Hi Stephan,

I have just installed git 1.6.2 on CentOS.

I am encountering the error:
fatal: pathspec ” did not match any files

when I run:
git add .

How did you fix it?

Thanks,
Jason

I’m exploring git too, and even if it is a big shift from centralized SCMs (I’ve been using SVN) I already see benefits of git, the main one being ability to check in revisions locally, thus maintaining history of changes, which in turn encourages experimenting new features in private branches.

My only concern is how will new developers, with no previous experience with SCMs of any kind, get their heads around it.

@Jason

Have you made any changes (created file/directory) in your working copy (directory in which you run “git add .” )?

Leave a Reply