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

Posted . Visible to the public.

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.

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
Thomas Eisenbarth
Last edit
License
Source code in this card is licensed under the MIT License.
Posted by Thomas Eisenbarth to makandra dev (2013-01-31 11:13)