Go to some code file in Idea 13. Right click on it. Why "Git->Show history" and "Git->Show history for Selection" options are in grey using Git with Intellij Idea 13?
One reason is that file is not under control of Git or just staged for the next commit.
EDIT
According to the source code, IDEA also does not enable Show History
options for files which are detected as binary files, files not in local file system (I actually do not quite realize what does it mean), files with the class
extention, "workspace files" (path/to/project/project.iws
- for file-based projects; path/to/project/.idea/workspace.xml
- for directory-based ones) and files from the "ignore" list (IDE Settings -> FileTypes -> "Ignore files and folders" textbox
)
From settings->Version Control edit the "Directory" entry in the table on the right pane and replace "project" with your project root path. You should now be able to show the history of files.
(This is of course a workaround, I'm not sure what IntelliJ considers to be the "project" directory)
One reason is that file is not under control of Git or just staged for the next commit.
EDIT
According to the source code, IDEA also does not enable Show History
options for files which are detected as binary files, files not in local file system (I actually do not quite realize what does it mean), files with the class
extention, "workspace files" (path/to/project/project.iws
- for file-based projects; path/to/project/.idea/workspace.xml
- for directory-based ones) and files from the "ignore" list (IDE Settings -> FileTypes -> "Ignore files and folders" textbox
)
I have the same issue using IntelliJ IDEA 13.1.1 on Mac OS X 10.9.2 with git --version returning: git version 1.8.5.2 (Apple Git-48)
Right-clicking within a .java file and selecting "Git->Compare with..." correctly shows the previous versions, but "Show History" is greyed out.
When using IDEA version 10 on the same system, everything works.
I filed a bug report: http://youtrack.jetbrains.com/issue/IDEA-123332
I found I had two (git managed) projects. One had annotations etc. working. One did not - the annotations and "show history" menu items were greyed out.
What resolved the problem in the latter project was to
- Open the File -> Settings menu,
- Select the "Version Control" section (at the top level, not in the "Git" subsection)
Here the project was set to use the top level Git directory. This looked fine, and most of the other aspects of Git seemed to work through IntelliJ IDEA. However if I then:
- Edited the directory entry (selecting, and clicking the pencil icon), and
- Changed the radio selection from "Directory" to "Project", saving it
This allowed me then to access the git annotations menus etc.
The other project (which also worked with respect to annotations) had two entries, both a project entry, and a directory entry.
This was on Linux with:
IntelliJ IDEA 2016.1.3
Build #IC-145.1617, built on June 3, 2016
JRE: 1.8.0_76-release-b198 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
I had an issue like this. The project I imported into intellij had several modules that were added into VCS settings. I had to remove the modules and only leave the main project as the git root.
I've had the same problem in IntelliJ 14.1 from time to time. Turned out it was due to using non-ASCII characters (e.g. æ
, ø
or å
) in the branch name I was working on. I renamed the branch, and IntelliJ was able to diff again.
I had the same problem, it turned out I was using the git worktree
feature which isn't supported on my version of Intellij -- see https://youtrack.jetbrains.com/issue/IDEA-143404.
© 2022 - 2024 — McMap. All rights reserved.