简体   繁体   中英

GitHub Help - Push Folders to Repository

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.

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM