Read more

git "fatal: bad config file line" after checking out branch

Thomas Eisenbarth
January 31, 2013Software engineer at makandra GmbH

If git gives you an error message such as "fatal: bad config file line 123 in .git/config" after you tried to checkout a branch with a very long branch name, you very likely come across a bug in git version < 1.8.

Illustration book lover

Growing Rails Applications in Practice

Check out our e-book. Learn to structure large Ruby on Rails codebases with the tools you already know and love.

  • Introduce design conventions for controllers and user-facing models
  • Create a system for growth
  • Build applications to last
Read more Show archive.org snapshot

You should ask someone with a newer git version (someone pushed the branch right?) to rename the branch to something shorter:

git -m old-very-very-long-branch-name new-short-branch-name
Posted by Thomas Eisenbarth to makandra dev (2013-01-31 12:13)