I currently have existing Intellij IDEA projects that are tied to the SVN repository. I'm thinking of switching these projects to use Git SVN because I find the need to have a local version control system when I'm not connected to the SVN repository.
Since Intellij IDEA doesn't provide the Git SVN bridge, I run the following command from the command line to clone the SVN repository to Git:-
git svn clone --stdlayout --username myuser http://svnrepo/myproject -A authors.txt myproject
After cloning the SVN repository, I open the Git-based project using Intellij IDEA. At this point, Intellij IDEA complains about missing version control directories. I found out that Intellij IDEA still remembers the old SVN configuration. Since the project now contains .git directories instead of .svn directories, Intellij IDEA gets confused and it doesn't know how to get connected to any repositories right now.
The only workaround that works for me is to do the following:-
That said, I cannot run Git on this Intellij IDEA project on one machine and at the same time use SVN on this Intellij IDEA project on another machine. Both machines must use Git, or else Intellij IDEA will not be able to commit to the version control repository. I'm fine with this and I can use Git in all my machines. However, I'm trying to find a way not to create brand new Git-based projects for all my existing SVN-based projects. This is very tedious because I have quite a few SVN projects that I need to run using Git now.
Is there a better solution for me to switch my SVN projects to Git using Intellij IDEA?
Thanks.
Commit changes to remote repositoryNavigate to VCS → Subversion → Commit Files option. A new window will appear. Here, you can see the files to be committed to remote respository. Verify the files and click on the Commit button to publish your changes.
One way to open the Git tool window is to hover over the quick access button in the bottom left of the IntelliJ IDEA window, and select Git. This will open the Git Log tool window. Alternatively, you can use ⌘9 (macOS), or Alt+9 (Windows/Linux), to open the Git Log tool window.
You can select the version control system for the current project from File | Settings | Version Control
. The setting is stored in one of the project files (.idea/vcs.xml
) so if you don't commit that file to version control, you can use different version control system on different machines.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With