Git plus, git don't work on atom but ok on console



I’m on 18 64-bit mint with Atom 1.21.1 64-bit
I have a directory with python3.6 files on which I installed git with
git init
from the console. The git version is 2.7.4

On the console I can do what I want: add, commit, etc…
But atom refuses to “see” git, I have the message:
Failed to spawn command git. Make sure git is installed and on your PATH

If I click on “Toggle git tab” I have the panel with the button “Create repository”.
If I click the button, I have the message:
Unable to initialize git repository in /home/patrick/Bureau/Python/labyrinthe/monLabyrinthe_II
This directory already contains a git repository

If I destroy. git and. gitignore and redo the last manipulation
I have a new initialized git working from the console but still not recognized on atom…

What can we do about it?
Thank you


When I reopened my sources on atom, I realized that last time I didn’t have to open the folder containing my python sources with “add project folder” but with “open folder” I guess the non-recognition of git comes from there?
Now (by opening the folder with “add project folder”) git is recognized by atom
Do you have any idea?


I don’t quite understand.

Can you make a video or outline steps of what you’re doing?


Here video you can see the difference when you open a directory with the subdirectory of the project in question and when you open only the subdirectory of the project.

I didn’t understand this limitation: apparently, in order for git to be taken into account, it is necessary to open as “project folder” only the subdirectory containing this one and not a directory containing this subdirectory.


This is correct. Atom only pays attention to git repos that exist in the top level of the project folders that are open.


Hi, I got the exact same issue, but I don’t understand the “top level” issue. My project path is /home/username/Projets/projet3-labyrinthe and my .git folder is in “projet3-labyrinthe”. What should I do to make Atom recognize it ?
By the way, it worked properly the first time I ran Atom, the project was already started and the repo initialized


Mind sharing (or sending me) a screenshot of your tree view? I’ve had a git repo not be recognized when it wasn’t the first project folder added (but other times they get recognized). It would also not be recognized if for whatever reason Atom doesn’t have permission to use git commands. Do you have any other repos that work?


the previous message is false
The bad way

The good way : :slight_smile:


Sorry, was abroad for the holidays ! So, I tried to init another folder via terminal then see if it’s recognized as a repo by Atom, but same problem. I noticed something though, it seems to react to my commits made via terminal : when I don’t commit my files are listed in orange in the tree view, but as soon as it’s done they revert to their normal white color.
Here’s my tree view :
Capture d’écran de 2017-12-28 11-49-47


That special icon next to projet3-labyrinthe and Tests, as well as the color changes, are both indicators that the repo is being recognized. Based on what I can see currently, I would say that Atom is working normally for you. What do you think you should be able to do in Atom that you’re having difficulty with?


The git panel on the right still asks me if I want to initialize the folder with a git repo, even if it has already been initialized (via console, I was switching from Sublime Text + console git to Atom and it’s integrated solution). And of course, when I click on the “Initialize” button, I get an error since it has already been initialized. Here’s a screenshot of the right panel :

The tab was working correctly the first time I ran Atom, but since then, impossible to make it work again.


Does that particular repository have any remotes?


No, this one was created just to test if another repo would be detected. It’s only local, not even a copy on GitHub.


I don’t know what’s going on with the tab.


Well, the whole program is acting weird, now I can’t even access the list of installed packages or check updates, I get this error everytime :

/snap/atom/109/usr/share/atom/resources/app/apm/bin/apm : ligne 63 : 19551 Erreur de segmentation (core dumped) “$binDir/$nodeBin” “cliPath" "@”

I’ll try to reinstall it when I have the time.


Woah. That escalated quickly. Let us know what happens. Atom is really easy to reinstall.


Apparently Atom does not support installation through Ubuntus Snap thingy (just yet?).
Try installing through one of the official ways detailed here instead.

And on topic:
I think the github panel might require your projects repository to have a remote origin set?
I suppose you could try it out by just setting any kind of remote to the repository.


Thanks a lot, it actually solved all my problems, even with git haha. Since it worked perfectly the first time, and the problems didn’t disappear after installing it a second time from the Ubuntu “app store”, I didn’t think that would be the problem ! But I used the installation method you gave me, and it worked like in day one !

Thanks to everyone for your time and help, you guys are the best !