Connecting to GitHub in Atom 1.18


#1

I’m new to Atom and I’m struggling to connect to GitHub.

I can open a project, initialise it as a git repository, and then all I can see in the GitHub pane is “This repository does not have any remotes hosted at GitHub.com.”

To me, it’s obvious that the project can’t push to a repository on GitHub, because I haven’t told it where the repository is. It has no URL, no username or password. I’ve tried working with GitHub before using Visual Studio, but despite knowing those things and following multiple step-by-step guides I never got it working there either.

This video shows nicely how to use the GitHub functionality, and I would love to do that, but I cannot find instructions anywhere for how to do that first step of actually linking a GitHub repository.

I have never been able to get GitHub working with any IDE, and the reason has always been the same: the step of actually linking to a repository is maddeningly complicated, broken, obscure or undocumented. It seems like one of those things “everyone knows” among those who use the IDE, but no-one ever bothers to explain. There are literally hundreds of guides on what “push”, “pull” “commit”, “fork” and all that does - I get it; that’s why I WANT to use it - but never any guides on how to get off the ground. When people like me ask the question, the answers say stuff like “Try this code!” followed by code that’s unintelligible to relative newbies. My response is usually “where am I supposed to put the code?” because no-one ever bothers to explain.

Please, before I go mad, could someone explain in simple terms how I can link a repository on GitHub to Atom?


Connecting GitHub with Atom
#2

Git is a command-line tool, and the Atom integrations handle most functions that you use in git, but not all.

Before you can link a repository to GitHub, you have to make a repository on GitHub. Do you have one? If so, please share the link.

Are you familiar with your system’s command line?

could someone explain in simple terms how I can link a repository on GitHub to Atom?

Your post seems a little contradictory about your intentions. Is the repository on GitHub, or do you want to sync a project on your computer with GitHub? Those are different situations.


#3

Thank you so much for the reply. Following instructions in a post from someone having a similar problem, I copied my GitHub repository and opened it in Atom.

I don’t understand why your two “different situations” are different. Ultimately, the repository and files exists in both locations, doesn’t it? And local changes can be pushed to / pulled from the repository on GitHub? If my understanding isn’t correct I would love to know why.

Link to an empty repository if you need one for example purposes.

I am familiar with the command line. My understanding was that the Git integration with Atom eliminated the need for it - clearly that was wrong.

Do I need Git installed as well as Atom - from old threads it seems like it maybe used to be necessary? Another question there’s literally no way for a new user of 1.18 to know, because it’s not documented or explained anywhere I can find. Again, I assumed that “we integrated Git and GitHub with Atom!” meant that I didn’t need it.


#4

Because cloning a repository from GitHub (or anywhere) can be done with one command. It takes slightly more work if you’re the one setting up the repository. You can copy from anywhere, but in order to create something and push it to a destination, you have to control both points.

My understanding was that the Git integration with Atom eliminated the need for it - clearly that was wrong.

The git integration includes most features, but not some of the configuration commands (. If you want a good GUI for handling git, I fancy GitKraken. It would help a whole lot more than Atom with some things, like navigating older, complex repositories. What Atom is good at is not having to leave the editor in order to sync your data.

Do I need Git installed as well as Atom - from old threads it seems like it maybe used to be necessary? Another question there’s literally no way for a new user of 1.18 to know, because it’s not documented or explained anywhere I can find. Again, I assumed that “we integrated Git and GitHub with Atom!” meant that I didn’t need it.

Atom lets you initialize a repository without it, so I’m guessing not, but then there doesn’t appear to be a way to set the remotes of that repository through the github package’s menu options, so I’m not sure how much good that does. One of the things that’s required when creating the repository on your computer is telling it where in the Internet to look for its twin.


#5

Yes! Exactly that; I need to tell the repository where on the internet to look for its twin. I did mention that in my initial post - I do understand what needs to happen, there’s just absolutely no explanation of how to do that that makes sense to me anywhere.

Or failing that, this “cloning can be done with one command” - that sounds marvellous! Again, how do I do this? I see where to do it on GitHub, but there is absolutely no explanation anywhere how to link clones to Atom.

I thought I demonstrated quite clearly that I understand that I need to control both points and do in fact do so, but that doesn’t help me with what I actually need to do to link them, which is the problem.

Simply pointing me to yet ANOTHER tool without explaining how to do any of these things isn’t quite the answer I was looking for. I don’t need to navigate old or complex repositories. I don’t need to do ANY of the fancy things that GitKraken does. I need to push, pull and do basic version control on a collaborative project. I’m just staggered that the text editor developed BY GITHUB doesn’t do these things natively. Is there some sort of secret prohibition that prevents IDEs from having easy-to-use Git integration? Why isn’t there a place in Atom for configuring the remote? It seems like it would be the very first thing you’d include if you were designing something to work with GitHub.

This is precisely what I want! But what good is this if no-one will explain to you how to link to the repository in the first place?

You mentioned the command line last time - clearly something needs to go into the project on my machine somewhere to tell it where the remote is. If I need to do something in the command line to create that thing I’m happy to do it - but can you please tell me what it is?


#6

Try this one.

I see where to do it on GitHub, but there is absolutely no explanation anywhere how to link clones to Atom.

There is no linking. If you clone a repo and open that folder in Atom, Atom will detect the fact that it’s a repo.

I thought I demonstrated quite clearly that I understand that I need to control both points and do in fact do so, but that doesn’t help me with what I actually need to do to link them, which is the problem.

No, what you demonstrated was loud skepticism about the fact that I knew what I was talking about, when what I asked was for a clear statement of your intentions so that I could give you step-by-step instructions on how to achieve your goals.

I’m just staggered

You’re entirely too staggered, and you’re taking it out on the first random person you found online who is trying to help you. You don’t have to do all this ranting. All you have to do is tell me what you plan to accomplish so that I can give you instructions on how to get there.

Why isn’t there a place in Atom for configuring the remote? It seems like it would be the very first thing you’d include if you were designing something to work with GitHub.

If you would like to ask this question of the developers, the best place to do so would be on the GitHub repo.

You mentioned the command line last time - clearly something needs to go into the project on my machine somewhere to tell it where the remote is. If I need to do something in the command line to create that thing I’m happy to do it - but can you please tell me what it is?

You have written a lot, but you have still not told me whether your ultimate goal is to get files from your computer onto GitHub or vice versa. The command (which requires installing git) is git remote add origin Lithovore/SAM-VP2. Since you have also neglected to mention your operating system, I’m unable to give you any guidance on how to install git.


#7

Thank you for sticking with me.

I was never sceptical that you knew what you were talking about - if I seemed frustrated, it was only because until the very last paragraph of your last answer, you didn’t answer my question. Here’s the point where you did so:

That is the answer I was looking for. I needed to install git. I’m still surprised that “Git integration” doesn’t actually cover include these most basic functions in Atom, particularly since it asked for my GitHub credentials in two different ways during linking plus an auth token - really at that point all that’s missing is the URL.

I think perhaps the confusion arose from the fact that you assumed I didn’t understand that I would need different commands to initialise a repo from a local machine vs cloning one from GitHub, and that that was where my problem was. Given that I only cared about the end result (a synced repo that I can push to / pull from), it was irrelevant to me which one of those things I did, so I in tun didn’t understand why you thought it was such a big deal. That’s my bad - sorry.

Anyway, having cloned a repository and done some stuff with tokens and permissions, I can now push to / pull from a repo.

The only problem I have now is that my GitHub panel says: “This branch is pinned to the pull request at this URL [url] but we couldn’t find a pull request at that URL. You can manually pin another GitHub pull request by entering it’s URL etc.”

I think I need to do something else from Git to fix this (entering a URL doesn’t seem to work), but I’m not exactly sure what.

Thank you again for your help thus far - apologies if my frustration seemed directed at you; it was not intended that way.


#8

You didn’t ask something to which I could give a concrete answer, because your post suggested two completely different intentions (wanting to clone a repo to your computer versus wanting to create a repo and make a mirror of it on GitHub). I can answer either of those questions, but if I don’t know which one is being asked, I want to make sure that the asker knows. Without an unambiguous statement of what the problem is, all I can do is give extremely general and largely unhelpful answers like the ones you were complaining about in your original post. Neither of us wants this thread to be “here’s literally everything about git”, especially since there are better sources than myself for that information.

That is the answer I was looking for. I needed to install git.

Since I haven’t found a remotes setting inside Atom, it is my conclusion you need to install git in order to set up remotes (again, GitKraken is easier to use as a newbie).

The only problem I have now is that my GitHub panel says: “This branch is pinned to the pull request at this URL [url] but we couldn’t find a pull request at that URL. You can manually pin another GitHub pull request by entering it’s URL etc.”

I don’t know. I haven’t encountered anything like that, but it seems to resemble this issue on the atom/github repo.

Thank you again for your help thus far - apologies if my frustration seemed directed at you; it was not intended that way.

I understand. :slight_smile: