How do I link to an existing Git and GitHub repository in 1.18?


#1

I’m loving Atom. I’ve just loaded 1.18 on Ubuntu 16.04. I can see the new Git/GitHub tabs that are available in 1.18. But when I open a project these tabs stay empty when the project contains a Git repository with the config file that links to GitHub.

Can anyone help me link to an existing Git and GitHub repository?

P.S. I’m a scientist and data scientist rather than a hard-core developer, so feel free to talk down to me and assume I am dumb :slight_smile:


#2

I’m having the same problem. I’ve tried uninstalling and reinstalling both 1.18 and 1.19 beta with no luck.

I’ve tried with both bitbucket and github repos. I didn’t expect the bitbucket repo to work, but I figured I’d give it a shot just in case.

The tree viewer shows changes properly (e.g. green for new files, orange for changes files) and if I manually manage git through the command line, the tree viewer updates correctly. But, the Git and GitHub tabs remain completely blank.


#3

Also, not sure if it’s related or not - but if I click “Create Repository” it will open a dialog to create a new repo in a given directory but when you click ‘init’ nothing happens. After a while, if you cancel out it will generate a message “unable to initialize git repository in …” but an empty folder will be created at the path listed in the error.


#4

git clone your repo and then open it via Atom


#5

Thank you very much - that has worked :slight_smile:


#6

Clearly I am not doing something correct. Here’s what I did:

  1. $ mkdir ~/Desktop/temp
  2. $ cd ~/Desktop/temp
  3. $ git clone git@github.com:ltconwell/dash-hack.git

That’s just an example project, I’ve tried it with multiple different repos.

Then:

  1. Open Atom
  2. File -> Add Project Folder…
  3. Desktop -> temp -> dash-hack
  4. Make changes to code

Nothing happens - git & github tabs remain blank. The file will change colors appropriately in the tree viewer and the individual lines of code will change colors appropriately. Also, there is no option available to change branches in the bottom status bar as shown in the images of the git integration as seen at https://github.atom.io/

In the image on that website, the status bar shows:

README.md 2:17          show-pr v ^ 0 files

Showing an option to switch branches and presumably push/pull

Mine shows:

init.sh 1:1         CRLF UTF-8 Shell Script 0 files

Just indicating the line ending types. There is no information about git.

So it appears that it’s not integrating git at all. I have Atom 1.18.0 and git 2.13.0 installed. Git works correctly as long as I do everything manually through the term. Atom seems to do nothing with git other than show color changes in the tree viewer.


#7

My other reply is stuck in the spam filter, so I’ll just give a quick reply while waiting on a mod.

I tried:

$ mkdir ~/Desktop/temp
$ cd ~/Desktop/temp
$ git clone git@github:user/project.git

Open the project in Atom and it’s still just showing a blank tab for git.


#8

Well, you did the same* as me. But with differing results.

*To be pedantic I wasn’t using the desktop, and I used the Ubuntu GUI file manager to create the new directory.


#9

I don’t know if everyone got their problem solved, but I just figured mine out. I had to add the project folder that holds my git repository. I know that sounds simple, but I had closed my project folder and added a project folder higher up my tree so I could see everything at a glance, and that’s when my git tab went blank. Closing the higher up project and reopening just my project folder did the trick! I am very new to Atom and git so I may be stating the obvious here, but it solved my problem and I’m back in business.


#10

Still not working for me. Atom 1.20 Linux Calculate(Gentoo clone) 64 bit
Do not init git repositories, do not show status for existing repo
WTF?


#11

I solve this issue:
File /usr/share/atom/resources/app/node_modules/dugite/git/bin/git should have Execution flag set

chmod +x **/usr/share/atom/resources/app/node_modules/dugite/git/bin/git**

#12

Ok, apparently I’m an idiot because I am still struggling with this topic. I am a newbie to Atom and trying to figure out how to integrate my existing GIT Repository (on my Mac) with Atom.

Apparently, I can create a new repository but no clue how to integrate my existing repository. (FYI, I am experimenting with several IDE’s so multiple IDE’s point to the same repository.

Any help would be appreciated and Thanks in Advance.


#13

You don’t have to integrate anything. Just open the local repo folder in Atom. If a git repo is a top-level project folder, Atom will automatically identify it, the folder in the tree view will have a special icon, and you will see additions and modifications highlighted in the directory structure.


#14

Ok, I think I got it. And I think I figured out why I was having problems - but not totally sure why.

  1. I have the packages “tool-bar 1.1.0” and “tool-bar-main 0.0.10” installed.
  2. I have multiple projects in a folder called “GIT_Repository”. So for example “.\GIT_Repository\Hello-World”
  3. When I use the open Icon (looks like a folder) on the toolbar and select “\GIT_Repository” nothing happens.
  4. However, when I go to: “File | Open” from the top menu bar and select “\GIT_Repository” all of my projects are displayed of which “Hello-World” is one of them, another project would be, for example “Fizz-Buzz”.

However, now - I have confused myself even more. I realize that this is not a GIT forum - but perhaps you can explain to me the difference between a GIT Repository and a GIT Project. I incorrectly assumed that a repository would have multiple projects. Then in reading I found that a repository and a project were synonymous. Then doing more reading it appears that a project can have multiple repositories but a repository can only have one project - which is the opposite of what I originally thought. Please straighten my newbie a$$ out. Thanks


#15

It could potentially be a bug with the tool-bar-main package.

I realize that this is not a GIT forum - but perhaps you can explain to me the difference between a GIT Repository and a GIT Project.

I have no idea what a “git project” is. If you provide a citation for where you’re finding this language, maybe I could tell you what it means. Since I don’t have any knowledge of a special definition for “project” with regard to the git software, I will use the general purpose sense of the term.

A git repository can be a whole project, or a project can be made up of several repositories (Atom, for instance, has a primary repo, a repo for the Flight Manual, and repos for each core package). When you see “project” used in relation to the Atom editor, it means all the files in the tree view: any top-level project folders that you have added and everything inside them.


#16

There seems to be some confusion here. The problem is not with tree-view package. Rather, it is with the git/github integration package, which failed to recognized existing git repo and insisted to create a new repo, without any other option. Quite disappointed with this package. Had to disable it for now until it can recognized existing repo.


#17

Thanks for the answer! I did the same thing. This works for me too.


#18

Noting that the user experience / documentation for using existing git repositories is definitely in need of improvement.

So, I did some digging myself, and found that this only looks when there is 1:1 matching between:

“Atom Project Folder” and “git repository folder”

For myself, who have been using a “Atom Project Folder” to manage a large number of git repositories, this took a little figuring out.


#19

made https://github.com/atom/atom/issues/17289 with more thoughts on this.


#20

Hey everyone, I’ve been fighting this issue the last couple of days and I think I found the problem. Atom and git work perfectly fine on my windows, while git doesn’t even show (at the bottom right hand corner) of my Linux (Fedora) machine. I’ve set up the latest git and atom & git still does not show.

I was trying to download a repository from GitHub onto my Linux computer and I followed all the steps. Cloned it right, the .git was at the top level and all the files were there. I still could not get git to work. Got me thinking and I set up a project on the Linux computer, initialized it and checked to see if it would work on my local computer, but it didn’t.

I checked to see if my windows was having the same problem, but it works with both local initialized projects and cloned repos. I’ll try digging around a while more to see if I can get the problem solved.