Git error “fatal: ambiguous argument ‘HEAD’: unknown revision or path not in the working tree”

As others pointed out, this message is coming from your shell prompt. The problem is that in a freshly created repository HEAD (.git/HEAD) points to a ref that doesn’t exist yet. % git init test Initialized empty shared Git repository in /Users/jhelwig/tmp/test/.git/ % cd test % cat .git/HEAD ref: refs/heads/master % ls -l .git/refs/heads total … Read more

How to set the runtime path (-rpath) of an executable with gcc under Mac OSX?

Found by experimentation, and inspecting the command lines generated by Xcode for a reference rpath demo project by Dave Driblin: otool -L shows you the install name of the linked libraries. To get @rpath to work, you need to change the install name of the library: $ gcc -dynamiclib blah.o -install_name @rpath/t/libblah.dylib -o libblah.dylib $ … Read more

`Apache` `localhost/~username/` not working

Looks like you need to uncomment the following: #LoadModule userdir_module libexec/apache2/mod_userdir.so and #Include /private/etc/apache2/extra/httpd-userdir.conf Then in httpd-userdir.conf you may need to uncomment: #Include /private/etc/apache2/users/*.conf Lastly you would need to create /private/etc/apache2/users/kevin.conf if it doesn’t exist. I think it should look something like this: <Directory “/Users/kevin/Sites/”> Options Indexes MultiViews AllowOverride None Require all granted </Directory> Make … Read more

How do I remove the “extended attributes” on a file in Mac OS X?

Use the xattr command. You can inspect the extended attributes: $ xattr s.7z com.apple.metadata:kMDItemWhereFroms com.apple.quarantine and use the -d option to delete one extended attribute: $ xattr -d com.apple.quarantine s.7z $ xattr s.7z com.apple.metadata:kMDItemWhereFroms you can also use the -c option to remove all extended attributes: $ xattr -c s.7z $ xattr s.7z xattr -h … Read more