Archives: May 2014

Here is the FSF answer to the partnership between Mozilla and Adobe to support Digital Restrictions Management (DRM) in Firefox.

Git refusing to delete a remote branch because it is set as current

I wanted to do some clean-up on a remote repository, which contained a lot of obsolete branches. But one of them returned the following error:

$ git push origin :alpha
remote: error: By default, deleting the current branch is denied, because the next
remote: error: 'git clone' won't result in any file checked out, causing confusion.
remote: error: 
remote: error: You can set 'receive.denyDeleteCurrent' configuration variable to
remote: error: 'warn' or 'ignore' in the remote repository to allow deleting the
remote: error: current branch, with or without a warning message.
remote: error: 
remote: error: To squelch this message, you can set it to 'refuse'.
remote: error: refusing to delete the current branch: refs/heads/alpha
To remote_repository_uri.git
 ! [remote rejected] alpha (deletion of the current branch prohibited)
error: failed to push some refs to 'remote_repository_uri.git'

As this verbose message explains, I was trying to delete the branch named "alpha", which was set as the current branch on the remote repository.

It was an old branch untouched for several months and I don't know how it has been set to be the current branch instead of master. Since the remote is a bare repository, I could not execute the usual git checkout master command. The solution is to move HEAD, which is a symbolic link pointing to the current branch. To make that link point to the master branch, execute the following command on the remote server:

$ git symbolic-ref HEAD refs/heads/master

We can verify where HEAD is pointing to with the same git symbolic-ref command:

$ git symbolic-ref HEAD


git-symbolic-ref Manual Page

Git: show all branches on a remote repository

The command below displays all the branches on the remote repository called "origin", including those that are not tracked locally. It also displays local branches configured to be pulled or pushed and their current state.

$ git remote show origin
* remote origin
  Fetch URL: my_repository_uri.git
  Push  URL: my_repository_uri.git
  HEAD branch: master
  Remote branches:
    development                     tracked
    master                          tracked
  Local branches configured for 'git pull':
    development         merges with remote development
    master              merges with remote master
  Local refs configured for 'git push':
    development pushes to development (up to date)
    master      pushes to master      (local out of date)


To list only the branches that are tracked locally, use:

$ git branch -r

Arch Linux upgrade fails because some file exists in filesystem

From time to time, pacman refuses to upgrade because of a file conflict. Since it does not want to take the responsibility of overwriting an existing file which might be used by another package, it displays the following error:

error: failed to commit transaction (conflicting files)
freeimage: /usr/lib/ exists in filesystem
Errors occurred, no packages were upgraded.

In this case, pacman tries to install the package freeimage, which contains a file named, but detects that a file with the same name exists at the same location.

To solve this conflict, we first need to verify that this file is currently not owned by another package:

$ pacman -Qo /usr/lib/
error: No package owns /usr/lib/

The above message means we can safely (re)move this file. Since we are cautious people:

$ sudo mv /usr/lib/ /usr/lib/

We repeat this procedure each time we see this error, then the next pacman -Syu should go smoothly. If pacman -Qo should return something like this:

$ pacman -Qo /usr/lib/
/usr/lib/ is owned by freeimage 3.16.0-2

Then it is probably a bug!


Avaaz staff members face increasing threats, including death threats! They have probably become too annoying to some of the corrupted people thinking the world is their personal playground... They ask our help to finance better security for them and their families.