How to connect existing local project folder to Github repository


MacBook Air, OSX 10.12.6
Atom 1.20.1

Most of the help on this pre-dates the Atom version that comes with native Github support…so I’m not finding the help I’m looking for.

What happened in order:

Installed Home Assistant in .homeassistant folder.
Configured DuckDNS
Port forwarded to my MacBook and got HA up and running
Discovered text editor sucks.
Downloaded TextMate, discovered it sucks too.
Discovered Github, created my first repository as suggested by the noob guide.
Found Atom and installed it so I could edit yaml files in Home Assistant
Wondered how to push what I’ve already got in .homeassistant folder to a repository on Github.

That’s where I’m stuck. In Atom, I have a message in the Github tab that reads:

“This repository does not have any remotes hosted at”

In the Git tab, there are a bunch of files listed in Unstaged Changes (orange) and a bunch in Staged Changes (green.) The push pull arrows at the bottom produce the following result:

“Note: No remote detected for branch master. Cannot push because…etc.”

So, fetch, Pull and Push are disabled.

So ultimately, the question is, how do I push my local project folder to a new repository on Github?


This is one of the things that Atom isn’t set up to do for you. If you don’t have git installed, you should do that now. In Terminal, navigate to .homeassistant and set the remote to your GitHub repo with this command:

git remote add origin


Thanks. I did that. It still wasn’t connecting and for some reason, Atom won’t push anything, but the GitHub Desktop app works quite well…so I’m working with that instead.


What happens when you try git push in Terminal?


Not as familiar with command line syntax in terminal as I need to be…so
I’m not sure how to use the command, but I would suspect it’s working since
the push feature in Github desktop works just fine.


When you have committed changes, git push sends them to the server. In all cases, the unfiltered command line output is the best way to identify what’s going on.


Sends what to the server? The contents of the folder in which git push is run, or the contents of a specified folder in the command as a switch. Does git push recognize the ignored files that I have setup?


All committed changes in the current repository.

Does git push recognize the ignored files that I have setup?

It doesn’t have to, because ignored files aren’t going to be committed unless you deliberately tell git to add them.