Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Intellij IDEA: fatal: bad revision 'HEAD'

I was working with my project with git within Intellij IDEA and everything was fine. Then I created a new repository which included the current one. I have updated Version Control section in Preferences to point to a new root folder, where IDE shown me two 'Git roots'. I included both.

Result: IDEA does not track any changes in files and pop ups the error: fatal: bad revision 'HEAD'. Also IDE states all my files are not versioned. Any ideas? Thanks.

like image 343
Eugene Avatar asked Aug 23 '12 10:08

Eugene


1 Answers

You can't just create a git directory on a parent directory of a repository, and expect things to work. It would help to know what you are actually trying to achieve, but a wild guess is that you probably want to have a look at git submodules.

like image 60
user1338062 Avatar answered Sep 28 '22 00:09

user1338062