4

I forked repository https://github.com/hornetq/hornetq.git so that it comes under my user id https://github.com/aniket91/hornetq.git. Then i cloned this repository to my local machine. This is successful

[aniket@localhost hornetMq]$ git clone https://github.com/aniket91/hornetq.git
Initialized empty Git repository in /home/aniket/hornetMq/hornetq/.git/
remote: Counting objects: 261664, done.
remote: Compressing objects: 100% (74027/74027), done.
remote: Total 261664 (delta 156514), reused 252367 (delta 147734)
Receiving objects: 100% (261664/261664), 128.22 MiB | 334 KiB/s, done.
Resolving deltas: 100% (156514/156514), done.

Now I wanted to import this project into my Intellij IDEA. So I did import project and selected the project root. Each time I open the project it gives me following error

6:03:17 PM Unsupported Git version
           The configured version of Git is not supported: 1.7.1.0.
           The minimal supported version is 1.7.1.1. Please update.

I have been using command line git for quite some time now. It works fine even with Eclipse ADT which I use for my android project. So what is the issue here?

Do I need to change any setting in Intellij IDEA to use it with lower git version? Or if I update git will it affect other got projects? And also how do I update present git with command line?(Maybe anything similar to yum update).

I would really prefer a workaround without changing the git version. Any suggestions are appreciated though.

Also my git version is indeed 1.7.1

[aniket@localhost hornetMq]$ git version
git version 1.7.1
3
  • 2
    In short, you're asking how to update git to a newer version. Go to git-scm.com/downloads, download the version for your platform (which is unknown to us), and install it. It will work fine with your existing projects. And even if it didn't, since everything is stored in a repository somewhere, you would simply hav to re-clone them. Commented Nov 19, 2013 at 12:49
  • 1
    No my question is partially why is Intellij IDEA creating issues with Git version where everything else works fine. And i really don't want to reclone repositories as some commits still have to be pushed to the master. Commented Nov 19, 2013 at 12:51
  • Because it has been implemented using git features and commands that don't exist in previous versions. Just like your android app won't work with android 1.0 if you have developed it against android 4.0. Upgrading to a recent version of git is trivial, so it isn't a problem. Commented Nov 19, 2013 at 13:11

3 Answers 3

8
  1. Check git version:
    $ sudo git --version
    
  2. Install the latest version of git via Homebrew:
    $ brew install git
    
  3. Define a new link to git:
    $ brew link --overwrite git
    
Sign up to request clarification or add additional context in comments.

Comments

3

The question was not as simple as upgrading git to newer version. I faced a lot of problem. Even after considering the suggestion to upgrade the git version CentOS repo has version 1.7 only whereas latest stable release is 1.8.4.3. This resulted in compatibility issues.

I had to download the sources. Build and install it. Then configure my Intellij IDEA to use this new installed version.

I have documents each step in this post. Hope it helps others facing similar problem in the future.

Comments

0

You can remove the .git folder from the current cloned repo and reinitialize git again.git init

Now perform git remote add to add the remote url or edit the .git/config file. Perform git pull/push operations. Hope it helps

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.