Fix problem with detached HEAD
Fix: with actual branch, remove refs/heads/