0

I'm using Linux Mint 18 and am trying to push my work, an entire folder, to my github repository. I've tried the SSH and HTML methods discussed on the site and just cannot get my work saved. Here's what I've tried:

git init
git remote set-url origin https://github.com/glicka/Neutron-Scatter-Camera.git
fatal: No such remote 'origin'
ssh git@github.com:glicka/Neutron-Scatter-Camera.git
ssh: Could not resolve hostname github.com:glicka/neutron-scatter-camera.git: Name or service not known

Please help. I'm new to git and just cannot figure it out. I want to push an entire folder to my repository.

Kenster
  • 23,465
  • 21
  • 80
  • 106
Adam Glick
  • 89
  • 1
  • 5
  • 1
    Related, if not duplicate: https://stackoverflow.com/questions/25503017/why-does-git-tell-me-no-such-remote-origin-when-i-try-to-push-to-origin and https://stackoverflow.com/questions/25931684/git-push-error-could-not-resolve-host-name – Jedi Jun 26 '17 at 20:21
  • As suggested in @Jedi's linked answers - run `git remote -v` to check your setup remotes – Peter Reid Jun 26 '17 at 20:24

2 Answers2

0

Execute:

git remote -v

to verify that you have a remote named origin.

If you don't have any remotes, you can add one with the name of origin by executing:

git remote add origin https://github.com/glicka/Neutron-Scatter-Camera.git
Peter Reid
  • 5,139
  • 2
  • 37
  • 33
  • Hi. Thank you for the response. How do I push my folder "Camera Data" to my repository? Is it just: git push Camera Data – Adam Glick Jun 26 '17 at 21:08
  • Executing `git push camera data` would `push` to an `origin` named `camera` on a branch of `data`. Might I suggest you [read the Git documentation](https://git-scm.com/book/en/v1/Getting-Started-Git-Basics), as your understanding of git push is incorrect. – Peter Reid Jun 26 '17 at 21:15
0

Try this from the beginning:

git init
git add .
git commit -m "first commit"
git remote add origin git remote add origin https://github.com/glicka/Neutron-Scatter-Camera.git
git push -u origin master
Michael Tong
  • 412
  • 4
  • 14