I am brand new to Atom and brand new to Github. Never used Git before either. I’ve been trying to get Github integration working in Atom for 8 hours now, to no avail. I’ve searched this forum, I’ve googled, I’ve watched youtube videos, I’ve perused the git command line reference, and I still do not have this working. I’ve gotten close a few times, but changes never end up on Github. I know noob questions like mine can be annoying, but boy I am just at my wit’s end here.
Here is what I’d like to do:
I’ve got a Github repository with two files in it. The repository is called “foo”, and the files are fileA.txt and fileB.txt. I do not currently have any branches besides master. What I’d like to do is get all of these files to my local machine, edit them in Atom, and after I’m done making changes I’d like to use Atom to have those changes reflected on Github.
I’ve tried using the Github “clone or download” button, followed by some combination of clicking “create repository” in Atom along with command line commands. I’ve also tried starting out from the command line, and doing a “git clone”. Nothing seems to work.
(note: I have done the two command prompt commands to let git know my username and email addr.)
Basically what I’m looking for here is a list of steps including the explicit command line commands that I need to perform to get this working. Here is one example that did not work (there were many many others):
- github.com - choose the respository and the branch
- github.com - click “clone or download” | “download zip”
- open the zip, and copy the contents to my local machine. Since the repo is named “foo” and my branch is master, the folder with the files ends up being named “foo-master”.
- Atom - File | “add project folder”, and select the “foo-master” folder.
- Atom - open the git panel and click “Create Repository”
- Command Prompt - change to the “foo-master” folder
- Command Prompt - “git remote add origin /* here is where the URL goes */”
At this point my 2 files both show up in Atom with green plus marks in the Git panel under “unstaged changes”. I would also point out that down at the bottom of the git panel the blue button says “create detached commit”. I go ahead and modify one of the files. I click “stage all”, enter a commit message, and click “create detached commit”. Now checking github, those changes aren’t there, but let’s continue. I change a file in Atom again. It now shows up with a red or orange icon in the git panel, and the button at the bottom now reads “commit to master”. I stage all, enter commit msg, click “commit to master”, and still no changes end up on github. Now I go to the github panel and click “publish and open new pull request” and I get a red “push rejected” error.
Thanks to anyone who can give me the exact list of steps I need to perform here.