LoginSignup
0
0

More than 5 years have passed since last update.

git worktree add -> Refusing to point HEAD outside of refs/

Last updated at Posted at 2018-06-20

環境

  • Ubuntu 16.04.4 LTS
  • git version 2.7.4

症状

git worktree add が失敗する

$ git worktree add -B master public origin/master
Branch master set up to track remote branch master from origin.
Preparing public (identifier public)
fatal: Refusing to point HEAD outside of refs/

解決

どうやらver2.7.4のgitで発生するバグらしく、以下の手順でgitをアップグレードすると無事解決。

$ sudo add-apt-repository ppa:git-core/ppa
$ sudo apt-get update
$ sudo apt-get install git

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0