IntelliJ - cannot commit file - intellij-idea

In IntelliJ, I cannot commit file (right click -> Subversion -> Commit File), the option is grayed out; however - it is possible to Update File.
As a workaround, I am able to commit the file through TortoiseSVN:
Could you help me to find out why is this happening?
I tried to configure project Settings -> Version Control:
And also, according to: Intellij Annotate Option Grayed Out
I tried to uncheck 'Use non-modal commit interface' but it didn't work.

It's not the best, but I found a solution to this problem, if I find anything else, I will definitely update.
From 'Version control -> Directory Mappings' I had to remove the Git repository, and leave only Subversion, then 'Commit File' works, but I can't in turn do anything (e.g. change branch) on the Git project (which is logical).
Then I cleared VCS log caches and indexes.
After that I re-added the Git project to 'Dependency Mappings'.
The problem is, I can't clear VCS log caches and indexes now, because 'Commit File' will stop working again (so again I'd have to remove Git, clear VCS, and add Git after that).
I'm guessing IntelliJ doesn't know which repository this 'Commit File' is for, so this option is greyed out. However, all options are now available.

Related

Unable to add Newly Created Files to SVN

There seems to be a problem adding newly created files to subversion through Intellij, because when I right click on any of them, the option to add them is grayed out and only Revert is accessible:
By the way, this problem only appears with newly added files, the old ones are detectable and can be edited and committed without problem.
Maybe I missed something when I created them?
Any help would be appreciated. Thank you.
The solution was really simple. Here's how I did, hopefully this will help someone else one day:
Leave Intellij (or the IDE you're using) aside and open your command prompt.
CD to the root of your project.
Manually add the files that you have created with the command add.
Example: svn add path/to/your/file.java
Go back to Intellij, you should see all your files which weren't detected before change color from yellow to green.
You can now commit your new files.

IntelliJ IDEA svn doesn't ignore .iml files

In Settings-Version Control-Ignored Files, I have already specified the mask *.iml.
However, when I click on Commit Changes (Ctrl+K), .iml files still appear in the change list. In the right-click menu of one of these.iml files, I see the "ignore..." button is disabled.
How do I ignore these? It is annoying having to uncheck all these files every time I make a commit.
The blue color means Modified - so the files are already under VCS. And it is possible to ignore only unversioned files.
So what you need is to remove the files from VCS first (using git rm --cached, if you use git, svn rm --keep-local for svn, etc), commit the removal (BTW, be sure to do this outside of the IDE), and then they will be properly ignored.

Intellij Annotate Option Grayed Out

I am trying to look at who changed a line in Intellij 15. I know I can use git blame but I want to learn how to do it correctly in intellij. I am right clicking on the line numbers on the file but when I get the context menu the annotate option is grayed out. What setting am I missing?
I looked at this page and couldn't find an answer. What am I missing?
If you check File > Settings > Version Control and see that your current project is listed under "Unregistered Roots", go to (on the menubar) VCS > Enable Version Control Integration. It will ask you to select the VCS tool you use, then click ok and you'll have all the integrations working (including the annotate feature which uses git blame).
The answer by #activedecay let me in the right direction. In my case, I have a multi-module project - each has a separate git repo - but we're all in the same workspace.
In my case, Intellij IDEA 2017.2, the Preferences -> Version Control (update from 2022: or Preferences > Version Control > Directory Mappings) panel shows a listing of all the project roots. The module with the disabled "Annotate" option was in the "Unregistered Roots" section.
To fix the problem, I selected the module and pressed the "+" icon in the lower toolbar to register the module root with Intellij VCS. The change is immediate and the "Annotate" options becomes available.
Looks like its a fresh project. First configure the Version Control like Git and than commit at least once. After first commit Annotate option will not be grayed out.
Also update git for any new version.
Your VCS is not enabled, hence the issue. Below is the solution for that:
Click on the VCS option in the menu bar
Enable VCS
Select your version control
Done, you should be able to use the annotate option.
Make sure the file is tracked by version control
Add the project to "Version Control" settings
I had the same issue with the Annotate being greyed out however VCS was already set up. Editing the current VCS Directory Mapping fixed the issue for me.
Go to
Settings -> Version Control
Click on the current entry for your
your application listed under projects.
Click the pen icon to edit it
Hit Ok, then ok to close the main dialog
Under the version control setting, make sure to remove any unregistered roots, I had a similar issue where there was a Unregistered roots entry was found, after removing this unwanted entry, I was able to annotate on file.
I the following two screen short will solve your problem:
1.
I hope after those steps you will be able to see who changed a line.
Here are the steps i followed :
Go to VCS -> Checkout from Version Control -> Git -> give the URL for your repository.
The annotate option will be enabled now.
I had exactly the same issue and managed to solve it by updating git.
The reason for that is that I have recent InteliJ Idea and an old 2.1.x git installed.
For Mac:
brew upgrade git
brew link git
followed by IDE restart.
Perhaps you did not check Git Integration while setting up a fresh installation of IntelliJ. It happened to me when I updated to a major release. When I was setting up the new program, I might have unchecked the Git Integration on the wizard installation.
In order to solve this for IntelliJ Community 2019.1, access File > Settings > Plugins, go to the tab Installed and make sure the plugin Git Integration is checked. You should restart the IDE in order to make the Annotate action work.
I had the same issue, but my VCS settings were all configured properly. It turns out that git itself was considering the file as a brand new file and therefore didn't have any history for it. The file was actually not new, but simply renamed. While my rename changes were unstaged, git understood it as two separate files: a deletion of the old file and creation of a new file. However, once I git added the "deleted" file and the "new" file, git understood that it was actually a rename and IntelliJ was able to annotate on the file as expected.
I'm not sure why git didn't understand the rename when it was unstaged, but hopefully this helps someone!

Geany IDE backup copy path

I just lost an entire script in Geany editor...
Is there a place where Geany saves a backup or cached copy somewhere?
Thank you for your help...
Geany does not automatically create backup files unless you enable the "Save Actions" plugin, and select "Auto Save".
It depends on what do you want. Geany can save a backup copy of the unedited file and also various options of saving the edit buffer. Read this nice wiki All you never wanted to know about file saving.
To backup scripts, use GitHub.
There are other VCS's (Version Control System), but Git has a strong feature set and is fairly easy to use. The real strength of Git, to my mind, is GitHub, which, so far as I know, is the only free-as-in-beer site which will let you create a large number of projects. It also seems to be well run, and I find many API's I like on that site.
Use VCS to:
1.) backup your code so that you don't lose it
1a.) backup offsite, such as to github in the event of your computer bursting into flames
2.) keep track of different versions, comments, etc
3.) collaborate! Give your code to the community. Or, fork someone elses code.
The caveat to all this is to omit passwords or other sensitive files. Don't upload a file with your credentials for logging into e-mail, for example. RTFM to see how to omit specific files with Git.
Finally, if you don't like Git there are alternatives, SVN has, in some scenarios, better syntax.
If you have just overwritten the file (Ctrl+S) and haven't yet quit Geany, you can just Ctrl+Z to the desired document state and save that file version.
If you have already quit Geany after that and haven't set up back up in Geany before, I am afraid that by means of Geany you cannot restore the file to the previous state.
Read this article about how to set up back up in Geany. Basically you can go to Edit -> Preferences -> Various (read the manual and the link above before changing these preferences) and:
disable use_atomic_file_saving (disabled by default)
enable use_gio_unsafe_file_saving (enabled by default)
enable gio_unsafe_save_backup (disabled by default)
This will always keep the previous version of the file (as a hidden file with ~ attached to its name) next to original.
Or you can install/enable the Save Actions Geany plugin and enable the Auto Save and Backup Copy options to automatically save files at a certain time interval and to keep a copy of previous file versions.

idea9.0.3 commit

I use idea 9.0.3 and I want to commit few my application's files to SVN.
Please can anyone tell me step by step what I have to do?
you need to add version control to the project, using the 'version control' menu option at the top. I have IDEA 10, so it might be different, but in the menu, there is an 'import into version control' option. So add your SVN repo there.
once you have done that you can right click on any file or directory, go to the 'Subversion' option, and do svn operations on the file.
I use command+k on my mac to automatically start the commit process. The only thing I need to remember is to add files when they are first created, else they don't get committed.
EDIT -- You might have failed to add svn to the project -- did you enter your credentials? I assumed there was already an svn repo for your project. You don't see something like: