Updating the currently checked out branch may cause confusion


Check your bare repository's config file and see if = false, if so set it to true to signal it really is bare. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [hidden email] More majordomo info at to true to signal it really is bare.

Hrm, is there a reason why this is explicitly configured rather than detected?

If you delete the setting from the configuration file, Git usually almost always guesses correctly. But I think it can fail if you create a file called HEAD in the top level of your source code tree. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [hidden email] More majordomo info at although I am having trouble finding any actual discussion of when it can go wrong.

There is some mention here: a little bit here in the 1.5.0 release notes: the latter talks about the heuristic being "does it end with .git", which I don't think we actually use anymore.

warning: warning: You can set 'Current Branch' configuration variable to warning: 'refuse' in the remote repository to forbid pushing into its warning: current branch.